sum

package
v0.0.0-...-4fdcbce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// docker run --name gomod --rm -it golang:1.15 bash
	// export USER=gomod
	// mkdir repo
	// cd repo
	// go mod init github.com/org/repo
	// go get golang.org/x/xerrors
	// go list -m all | awk 'NR>1 {sub(/^v/, "", $2); printf("{\""$1"\", \""$2"\", },\n")}'
	GoModNormal = []types.Library{
		{"golang.org/x/xerrors", "0.0.0-20231012003039-104605ab7028"},
	}

	// https://github.com/uudashr/gopkgs/blob/616744904701ef01d868da4b66aad0e6856c361d/v2/go.sum
	GoModEmptyLine = []types.Library{
		{Name: "github.com/karrick/godirwalk", Version: "1.12.0"},
		{Name: "github.com/pkg/errors", Version: "0.8.1"},
	}

	// docker run --name gomod --rm -it golang:1.15 bash
	// export USER=gomod
	// mkdir repo
	// cd repo
	// go mod init github.com/org/repo
	// go get golang.org/x/xerrors
	// go get github.com/urfave/cli
	// go get github.com/stretchr/testify
	// go get github.com/BurntSushi/toml
	// go list -m all | awk 'NR>1 {sub(/^v/, "", $2); printf("{\""$1"\", \""$2"\", },\n")}'
	GoModMany = []types.Library{
		{"github.com/BurntSushi/toml", "1.3.2"},
		{"github.com/cpuguy83/go-md2man/v2", "2.0.2"},
		{"github.com/davecgh/go-spew", "1.1.1"},
		{"github.com/pmezard/go-difflib", "1.0.0"},
		{"github.com/russross/blackfriday/v2", "2.1.0"},
		{"github.com/stretchr/objx", "0.5.0"},
		{"github.com/stretchr/testify", "1.8.4"},
		{"github.com/urfave/cli", "1.22.14"},
		{"golang.org/x/xerrors", "0.0.0-20231012003039-104605ab7028"},
		{"gopkg.in/check.v1", "0.0.0-20161208181325-20d25e280405"},
		{"gopkg.in/yaml.v2", "2.4.0"},
		{"gopkg.in/yaml.v3", "3.0.1"},
	}

	// docker run --name gomod --rm -it golang:1.15 bash
	// export USER=gomod
	// mkdir repo
	// cd repo
	// go mod init github.com/org/repo
	// go get github.com/aquasecurity/trivy
	// go list -m all | awk 'NR>1 {sub(/^v/, "", $2); printf("{\""$1"\", \""$2"\", },\n")}'
	GoModTrivy = []types.Library{}/* 1030 elements not displayed */

)

Functions

func NewParser

func NewParser() types.Parser

Types

type Parser

type Parser struct{}

func (*Parser) Parse

func (p *Parser) Parse(r dio.ReadSeekerAt) ([]types.Library, []types.Dependency, error)

Parse parses a go.sum file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL