Documentation
¶
Overview ¶
Package mageextras provides premade tasks for common mage workflows.
Index ¶
- Variables
- func CollectGoFiles() error
- func CoverageHTML(htmlFilename string, profileFilename string) error
- func CoverageProfile(profileFilename string) error
- func GoEnv(key string) (string, error)
- func GoImports(args ...string) error
- func GoVet(args ...string) error
- func GoVetShadow() error
- func Install(args ...string) error
- func Nakedret(args ...string) error
- func Uninstall(applications ...string) error
- func UnitTest(args ...string) error
Constants ¶
This section is empty.
Variables ¶
var CollectedGoFiles = make(map[string]bool)
CollectedGoFiles represents source and test Go files in a project. Populdated with CollectGoFiles().
var CollectedGoSourceFiles = make(map[string]bool)
CollectedGoSourceFiles represents the set of Go source files in a project. Populated with CollectGoFiles().
var CollectedGoTestFiles = make(map[string]bool)
CollectedGoTestFiles represents the set of Go test files in a project. Populdated with CollectGoFiles().
var GoListSourceFilesTemplate = "{{$p := .}}{{range $f := .GoFiles}}{{$p.Dir}}/{{$f}}\n{{end}}"
GoListSourceFilesTemplate provides a standard Go template for querying a project's Go source file paths.
var GoListTestFilesTemplate = "{{$p := .}}{{range $f := .XTestGoFiles}}{{$p.Dir}}/{{$f}}\n{{end}}"
GoListTestFilesTemplate provides a standard Go template for querying a project's Go test file paths.
var PathSeparatorString = string(os.PathSeparator)
PathSeparatorString models the os.PathSeparator as a string.
var Version = "0.0.42"
Version is semver.
Functions ¶
func CollectGoFiles ¶
func CollectGoFiles() error
CollectGoFiles populates CollectedGoFiles, CollectedGoSourceFiles, and CollectedGoTestFiles.
Vendored files are ignored.
func CoverageHTML ¶
CoverageHTML generates HTML formatted coverage data.
func CoverageProfile ¶
CoverageProfile generates raw coverage data.
func GoVetShadow ¶
func GoVetShadow() error
GoVetShadow runs go vet against all Go packages in a project, with variable shadow checking enabled.
Depends on golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
Types ¶
This section is empty.