mod

package
v0.0.0-...-325b881 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoVersion

func GoVersion() (string, error)

func Install

func Install(path, version string, args []string) error

func SplitVer

func SplitVer(s string) (string, string)

func Uninstall

func Uninstall(bi *BuildInfo) error

Types

type BuildInfo

type BuildInfo struct {
	buildinfo.BuildInfo
}

func (*BuildInfo) Matched

func (bi *BuildInfo) Matched(filters []string) bool

type ModuleError

type ModuleError struct {
	Err string // the error itself
}

type ModuleInfo

type ModuleInfo struct {
	Path       string       `json:",omitempty"` // module path
	Version    string       `json:",omitempty"` // module version
	Versions   []string     `json:",omitempty"` // available module versions
	Replace    *ModuleInfo  `json:",omitempty"` // replaced by this module
	Time       *time.Time   `json:",omitempty"` // time version was created
	Update     *ModuleInfo  `json:",omitempty"` // available update (with -u)
	Main       bool         `json:",omitempty"` // is this the main module?
	Indirect   bool         `json:",omitempty"` // module is only indirectly needed by main module
	Dir        string       `json:",omitempty"` // directory holding local copy of files, if any
	GoMod      string       `json:",omitempty"` // path to go.mod file describing module, if any
	GoVersion  string       `json:",omitempty"` // go version used in module
	Retracted  []string     `json:",omitempty"` // retraction information, if any (with -retracted or -u)
	Deprecated string       `json:",omitempty"` // deprecation message, if any (with -u)
	Error      *ModuleError `json:",omitempty"` // error loading module
}

type Pkg

type Pkg struct {
	Name            string
	BuildInfo       *BuildInfo
	ModuleInfo      *ModuleInfo
	SelectedVersion *ModuleInfo
}

func FindPackage

func FindPackage(name, path, ver string) (*Pkg, error)

func ListInstalled

func ListInstalled(filter []string, exclude []string) ([]Pkg, error)

func (*Pkg) CheckPath

func (pkg *Pkg) CheckPath() bool

func (*Pkg) FetchModuleInfo

func (pkg *Pkg) FetchModuleInfo() error

func (*Pkg) HasUpdate

func (pkg *Pkg) HasUpdate() bool

func (*Pkg) Print

func (pkg *Pkg) Print()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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