modfetch

package
v0.13.10 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DbgFlagVerbose dbgFlags = 1 << iota
	DbgFlagShowError
	DbgFlagAll = DbgFlagShowError | DbgFlagVerbose
)

Variables

View Source
var ErrNoCommits error = noCommitsError{}

ErrNoCommits is an error equivalent to fs.ErrNotExist indicating that a given repository or module contains no commits.

Functions

func Get

func Get(modPath string, noCache ...bool) (mod module.Version, err error)

Get downloads a modPath to GOMODCACHE.

func GetPkg added in v0.9.5

func GetPkg(pkgPathVer, modBase string) (modVer module.Version, relPath string, err error)

GetPkg downloads the module that contains pkgPath to GOMODCACHE.

func SetDebug added in v0.11.9

func SetDebug(flags dbgFlags)

SetDebug sets debug flags.

func Split added in v0.9.5

func Split(pkgPath, modBase string) (modPath, relPath string)

Split splits a pkgPath into modPath and its relPath to module root.

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.

type Versions added in v0.12.0

type Versions struct {
	List []string // semver versions
}

A Versions describes the available versions in a module repository.

Jump to

Keyboard shortcuts

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