gomod

package
v0.0.0-...-586fb1d Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: MIT Imports: 5 Imported by: 1

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-20200804184101-5ec99f83aff1"},
	}

	// https://github.com/uudashr/gopkgs/blob/616744904701ef01d868da4b66aad0e6856c361d/v2/go.sum
	GoModEmptyLine = []types.Library{
		{"github.com/karrick/godirwalk", "1.12.0"},
		{"github.com/pkg/errors", "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", "0.3.1"},
		{"github.com/cpuguy83/go-md2man/v2", "2.0.0-20190314233015-f79a8a8ca69d"},
		{"github.com/davecgh/go-spew", "1.1.0"},
		{"github.com/pmezard/go-difflib", "1.0.0"},
		{"github.com/russross/blackfriday/v2", "2.0.1"},
		{"github.com/shurcooL/sanitized_anchor_name", "1.0.0"},
		{"github.com/stretchr/objx", "0.1.0"},
		{"github.com/stretchr/testify", "1.7.0"},
		{"github.com/urfave/cli", "1.22.5"},
		{"golang.org/x/xerrors", "0.0.0-20200804184101-5ec99f83aff1"},
		{"gopkg.in/check.v1", "0.0.0-20161208181325-20d25e280405"},
		{"gopkg.in/yaml.v2", "2.2.2"},
		{"gopkg.in/yaml.v3", "3.0.0-20200313102051-9f266ea9e77c"},
	}

	// 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{}/* 336 elements not displayed */

)

Functions

func Parse

func Parse(r io.Reader) ([]types.Library, error)

Parse parses a go.sum file

Types

This section is empty.

Jump to

Keyboard shortcuts

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