Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListStdPkgs ¶
func ListStdPkgs() []string
ListStdPkgs returns a list of all packages in the golang standard library with the specific GOPATH.
func MakeContext ¶
MakeContext makes a build context for the given GOPATH.
Types ¶
type Package ¶
type Package struct { Build *build.Package ImportMap map[string]string // import remapping due to vendoring ModRoot string // module root import path, not including version ModVerRoot string // module root import path, including version ModVerPath string // alias import path when module is enabled }
Package is a package in the scan result.
type Program ¶
Program is a loaded program from a set of packages.
type ScanOptions ¶
type ScanOptions struct { Context *build.Context // TestdataWhiteList provides a whitelist of "testdata" packages that are // valid ones and being imported. TestdataWhiteList map[string]bool // PkgBlackList is a list of packages that will be skipped. It will also // skip its sub packages. PkgBlackList map[string]bool }
ScanOptions provides the options for scanning a Go language repository.
type ScanResult ¶
type ScanResult struct { Repo string Pkgs map[string]*Package HasVendor bool HasInternal bool Warnings []error }
ScanResult has the scanning result
func ScanModPkgs ¶
func ScanModPkgs(mod, dir string, opts *ScanOptions) (*ScanResult, error)
ScanModPkgs scans all packages in a module.
func ScanPkgs ¶
func ScanPkgs(p string, opts *ScanOptions) (*ScanResult, error)
ScanPkgs scans all packages under a package path.
Click to show internal directories.
Click to hide internal directories.