Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTestPackage ¶
IsTestPackage returns true if the given package is a test package and false otherwise.
func RelativePackageName ¶
RelativePackageName return the package name relative towards the given root package. relPkg can be `/`, `main` or a path like `pkg/x/mytool`. strictRelPkg can be `/`, a path like `pkg/x/mytool` or empty.
func UniquePackageName ¶
UniquePackageName returns strictRelPkg if it isn't empty and relPkg otherwise.
func UniquePackages ¶
func UniquePackages(pkgs []*Package) map[string]*PackageInfo
UniquePackages makes the given list of packages unique.
Types ¶
type PackageInfo ¶
type PackageInfo struct { UniqName string Size int Type PkgType Deps []*PackageInfo Pkg *Package }
Click to show internal directories.
Click to hide internal directories.