Documentation ¶
Index ¶
- Variables
- func GetModuleName() (string, error)
- func HasTests(pkg string) (bool, error)
- func ListDeps(pkg string) ([]string, error)
- func ListDepsForNotice() (string, error)
- func ListDepsLocation(pkg string) (map[string]string, error)
- func ListModuleCacheDir(pkg string) (string, error)
- func ListModuleVendorDir(pkg string) (string, error)
- func ListPackages(pkgs ...string) ([]string, error)
- func ListProjectPackages() ([]string, error)
- func ListTestFiles(pkg string) ([]string, error)
- type ArgOpt
- type Args
Constants ¶
This section is empty.
Variables ¶
var Download goDownload = runGoDownload
Download runs `go download` and provides optionals for adding command line arguments.
var Get goGet = runGoGet
Get runs `go get` and provides optionals for adding command line arguments.
var Install goInstall = runGoInstall
Install runs `go install` and provides optionals for adding command line arguments.
var Licenser goLicenser = runGoLicenser
Licenser runs `go-licenser` and provides optionals for adding command line arguments.
var Mod = goMod{
Download: modCommand{"download"}.run,
Init: modCommand{"init"}.run,
Tidy: modCommand{"tidy"}.run,
Verify: modCommand{"verify"}.run,
Vendor: modCommand{"vendor"}.run,
}
Mod is the command go mod.
var NoticeGenerator goNoticeGenerator = runGoNoticeGenerator
NoticeGenerator runs `go-license-detector` and provides optionals for adding command line arguments.
var Test goTest = runGoTest
Test runs `go test` and provides optionals for adding command line arguments.
Functions ¶
func GetModuleName ¶
GetModuleName returns the name of the module.
func ListDepsForNotice ¶
func ListDepsLocation ¶
ListDepsLocation calls `go list -dep` for every package spec given.
func ListModuleCacheDir ¶
ListModuleCacheDir returns the module cache directory containing the specified module. If the module does not exist in the cache, an error will be returned.
func ListModuleVendorDir ¶
ListModuleVendorDir returns the vendor directory containing the specified module. If the module has not been vendored, an error will be returned.
func ListPackages ¶
ListPackages calls `go list` for every package spec given.
func ListProjectPackages ¶
ListProjectPackages lists all packages in the current project
func ListTestFiles ¶
ListTestFiles lists all go and cgo test files available in a package.
Types ¶
type ArgOpt ¶
type ArgOpt func(args *Args)
ArgOpt is a functional option adding info to Args once executed.
type Args ¶
type Args struct {
// contains filtered or unexported fields
}
Args holds parameters, environment variables and flag information used to pass to the go tool.