Documentation
¶
Index ¶
- func BinaryPathList(path string) ([]string, error)
- func GetLatestVer(modulePath string) (string, error)
- func GetPackageVersion(cmdName string) string
- func GoBin() (string, error)
- func GoVersionWithOptionM(bin string) ([]string, error)
- func Install(importPath string, buildFlags *config.BuildFlags) error
- func IsAlreadyUpToDate(ver Version) bool
- type GoPaths
- type Package
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryPathList ¶
func GetLatestVer ¶
GetLatestVer executes "go list -m -f {{.Version}} <importPath>@latest"
func GetPackageVersion ¶
func GoVersionWithOptionM ¶
GoVersionWithOptionM returns result of "go version -m"
func IsAlreadyUpToDate ¶
Types ¶
type GoPaths ¶
type GoPaths struct { GOBIN string GOPATH string // TmpPath is tmporary path for dry run TmpPath string }
func NewGoPaths ¶
func NewGoPaths() *GoPaths
func (*GoPaths) EndDryRunMode ¶
func (*GoPaths) StartDryRunMode ¶
StartDryRunMode changes the GOBIN or GOPATH settings to install the binaries in the temporary directory.
type Package ¶
type Package struct { Name string ImportPath string // ModulePath is path where go.mod is stored ModulePath string Version *Version BuildFlags *config.BuildFlags }
func GetPackageInformation ¶
func (*Package) CurrentToLatestStr ¶
CurrentToLatestStr returns string about the current version and the latest version
func (*Package) SetCurrentVer ¶
func (p *Package) SetCurrentVer()
func (*Package) SetLatestVer ¶
func (p *Package) SetLatestVer()
func (*Package) VersionCheckResultStr ¶
VersionCheckResultStr returns string about command version check.
Click to show internal directories.
Click to hide internal directories.