Documentation
¶
Index ¶
- Constants
- Variables
- func Get(modPath string, noCache ...bool) (mod module.Version, err error)
- func GetPkg(pkgPathVer, modBase string) (modVer module.Version, relPath string, err error)
- func SetDebug(flags dbgFlags)
- func Split(pkgPath, modBase string) (modPath, relPath string)
- type RevInfo
- type Versions
Constants ¶
const ( DbgFlagVerbose dbgFlags = 1 << iota DbgFlagShowError DbgFlagAll = DbgFlagShowError | DbgFlagVerbose )
const ErrNotFound = syscall.ENOENT
ErrNotFound is the sentinel reported when a module or package does not exist. It is the same value as github.com/goplus/mod.ErrNotFound (both are syscall.ENOENT), kept here so modfetch does not import the root mod package and create an import cycle through packages that depend on both.
Variables ¶
var ErrNoCommits error = noCommitsError{}
ErrNoCommits is an error equivalent to fs.ErrNotExist indicating that a given repository or module contains no commits.
Functions ¶
Types ¶
type RevInfo ¶ added in v0.12.0
type RevInfo struct {
Version string // suggested version string for this revision
Time time.Time // commit time
// These fields are used for Stat of arbitrary rev,
// but they are not recorded when talking about module versions.
Name string `json:"-"` // complete ID in underlying repository
Short string `json:"-"` // shortened ID, for use in pseudo-version
}
A RevInfo describes a single revision in a module repository.