Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ResolveCurrent = false
ResolveCurrent selects whether the package should only the dependencies for the current OS/ARCH instead of all possible permutations. This is not concurrently safe which is ok for the current application. If other needs arise it may need to be re-written.
Functions ¶
func GetRootFromPackage ¶
GetRootFromPackage retrives the top level package from a name.
From a package name find the root repo. For example, the package github.com/Khulnasoft-lab/gococ/io has a root repo at github.com/Khulnasoft-lab/gococ
func NormalizeName ¶
NormalizeName takes a package name and normalizes it to the top level package.
For example, golang.org/x/crypto/ssh becomes golang.org/x/crypto. 'ssh' is returned as extra data.
FIXME: Is this deprecated?
Types ¶
type BuildCtxt ¶
BuildCtxt is a convenience wrapper for not having to import go/build anywhere else
func GetBuildContext ¶
GetBuildContext returns a build context from go/build. When the $GOROOT variable is not set in the users environment it sets the context's root path to the path returned by 'go env GOROOT'.
TODO: This should be moved to the `dependency` package.
func (*BuildCtxt) PackageName ¶
PackageName attempts to determine the name of the base package.
If resolution fails, this will return "main".