Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFileNotFound = fmt.Errorf(`mod: unable to find "go.mod": %w`, fs.ErrNotExist)
ErrFileNotFound occurs when no go.mod can be found
View Source
var GOPATH = build.Default.GOPATH
GOPATH is the default GOPATH for the current build environment. This is exposed for testing purposes, but should not be changed in production code.
Functions ¶
Types ¶
type Module ¶
func Find ¶
Find the first go.mod file in one of the directories below or return an error. Find will also search parent directories for a go.mod file.
func MustFind ¶ added in v0.0.3
MustFind a go.mod file in this directory or any parent directory. If no go.mod file is found, this will panic.
func (*Module) ResolveDir ¶ added in v0.0.3
ResolveDir resolves an import path to an absolute path.
Click to show internal directories.
Click to hide internal directories.