Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ModPackageFileError = eris.New("could not find mod package file") NonGoModPackageError = eris.New("path could not be found, as this function must be run from within a" + "go.mod package") EmptyFileError = eris.New("empty file supplied, must be") UnableToListPackagesError = eris.New("unable to list dependencies for current go.mod packages") )
Functions ¶
func GetCurrentModPackageFile ¶
Returns the current go mod package Ex: /path/to/solo-kit/go.mod
Will return /dev/null on unix if not in a go.mod package
func GetCurrentModPackageName ¶
Returns the current go mod package name from the go.mod file. Use the function below to get the filename Ex: github.com/solo-io/solo-kit
Types ¶
type Module ¶
type Module struct { Path string // module path Version string // module version Versions []string // available module versions (with -versions) Replace *Module // replaced by this module Time *time.Time // time version was created Update *Module // available update, if any (with -u) Main bool // is this the main module? Indirect bool // is this module only an indirect dependency of main module? Dir string // directory holding files for this module, if any GoMod string // path to go.mod file for this module, if any GoVersion string // go version used in module Error *ModuleError // error loading module }
mirror of https://golang.org/src/cmd/go/internal/list/list.go used to unmarshal output of `go list -m json`
type ModuleError ¶
type ModuleError struct {
Err string // the error itself
}
Click to show internal directories.
Click to hide internal directories.