sum

package
v0.0.0-...-38cc094 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 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{
		{Name: "golang.org/x/xerrors", Version: "0.0.0-20200804184101-5ec99f83aff1"},
	}

	// 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{
		{Name: "github.com/BurntSushi/toml", Version: "0.3.1"},
		{Name: "github.com/cpuguy83/go-md2man/v2", Version: "2.0.0-20190314233015-f79a8a8ca69d"},
		{Name: "github.com/davecgh/go-spew", Version: "1.1.0"},
		{Name: "github.com/pmezard/go-difflib", Version: "1.0.0"},
		{Name: "github.com/russross/blackfriday/v2", Version: "2.0.1"},
		{Name: "github.com/shurcooL/sanitized_anchor_name", Version: "1.0.0"},
		{Name: "github.com/stretchr/objx", Version: "0.1.0"},
		{Name: "github.com/stretchr/testify", Version: "1.7.0"},
		{Name: "github.com/urfave/cli", Version: "1.22.5"},
		{Name: "golang.org/x/xerrors", Version: "0.0.0-20200804184101-5ec99f83aff1"},
		{Name: "gopkg.in/check.v1", Version: "0.0.0-20161208181325-20d25e280405"},
		{Name: "gopkg.in/yaml.v2", Version: "2.2.2"},
		{Name: "gopkg.in/yaml.v3", Version: "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 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