Documentation
¶
Index ¶
- Variables
- func CmpInt(x, y string) int
- func CompareSemVer(v, w string) int
- func CompareVersion(x, y string) int
- func FindGoModDir(dir string) (string, error)
- func FindGoModDirSubPath(dir string) ([]string, string, error)
- func FromToolchain(name string) string
- func GetGoVersionOutput(goBinary string) (string, error)
- func GetModPath(dir string) (string, error)
- func IsValidSemVer(v string) bool
- func IsValidVersion(x string) bool
- func ListPackages(dir string, mod string, args []string) ([]string, error)
- func ModCompare(path string, x, y string) int
- func ResolveMainModule(dir string) (subPaths []string, mainModule string, err error)
- type GoVersion
- type ModVersion
- type VendorInfo
- type Version
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrGoModDoesNotHaveModule = errors.New("go.mod does not have module")
View Source
var ErrGoModNotFound = errors.New("go.mod not found")
Functions ¶
func CompareSemVer ¶ added in v1.0.26
func CompareVersion ¶ added in v1.0.26
func FindGoModDir ¶ added in v1.0.37
func FindGoModDirSubPath ¶ added in v1.0.45
func FromToolchain ¶ added in v1.0.26
func GetGoVersionOutput ¶
func GetModPath ¶ added in v1.0.37
func IsValidSemVer ¶ added in v1.0.26
func IsValidVersion ¶ added in v1.0.26
func ListPackages ¶ added in v1.0.39
go list ./pkg
func ModCompare ¶ added in v1.0.26
Types ¶
type ModVersion ¶ added in v1.0.26
type VendorInfo ¶ added in v1.0.26
type VendorInfo struct {
VendorList []ModVersion // modules that contribute packages to the build, in order of appearance
VendorReplaced []ModVersion // all replaced modules; may or may not also contribute packages
VendorVersion map[string]string // module path → selected version (if known)
VendorPkgModule map[string]ModVersion // package → containing module
VendorMeta map[ModVersion]vendorMetadata
// contains filtered or unexported fields
}
func ParseVendor ¶ added in v1.0.26
func ParseVendor(dirOrFile string) (*VendorInfo, error)
ParseVendor reads the list of vendored modules from vendor/modules.txt.
func ParseVendorContent ¶ added in v1.0.26
func ParseVendorContent(content string) *VendorInfo
type Version ¶ added in v1.0.26
type Version struct {
Major string // decimal
Minor string // decimal or ""
Patch string // decimal or ""
Kind string // "", "alpha", "beta", "rc"
Pre string // decimal or ""
}
see: https://cs.opensource.google/go/go/+/master:src/internal/gover/gover.go
func ParseVersion ¶ added in v1.0.26
Click to show internal directories.
Click to hide internal directories.