modfile

package
v1.16.0-beta10 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCmdOutput

func GetCmdOutput(cmd []string) ([]byte, error)

Types

type AllPackages

type AllPackages struct {
	Go      string              `json:"Go"`
	Require []GoPackage         `json:"Require"`
	Replace []ReplacedGoPackage `json:"Replace"`
}

func Parse

func Parse() (AllPackages, error)

Parse returns the go.mod dependencies in a structured format It is an alternative to using https://pkg.go.dev/golang.org/x/mod which frequently contains CVEs and must be updated

type GoPackage

type GoPackage struct {
	Path     string `json:"Path"`
	Version  string `json:"Version"`
	Indirect bool   `json:"Indirect"`
}

type ReplacedGoPackage

type ReplacedGoPackage struct {
	Old GoPackage `json:"Old"`
	New GoPackage `json:"New"`
}

Jump to

Keyboard shortcuts

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