Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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/Masterminds/cookoo/io has a root repo at github.com/Masterminds/cookoo
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".