Documentation
¶
Overview ¶
Package mx provides premade tasks for common mage workflows.
Index ¶
- Constants
- func CoverageHTML(htmlFilename string, profileFilename string) error
- func CoverageProfile(profileFilename string) error
- func ExecSilent(env map[string]string, program string, args ...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 RunVSilent(program string, args ...string) error
- func Uninstall(applications ...string) error
- func UnitTest(args ...string) error
- type GoPaths
Constants ¶
const 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.
const 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.
const Version = "0.0.47"
Version is semver.
Variables ¶
This section is empty.
Functions ¶
func CoverageHTML ¶
CoverageHTML generates HTML formatted coverage data.
func CoverageProfile ¶
CoverageProfile generates raw coverage data.
func ExecSilent ¶ added in v0.0.47
ExecSilent executes commands with the UNIX / Go idiom of silencing output unless of an error.
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
func RunVSilent ¶ added in v0.0.47
RunVSilent executes commands with the UNIX / Go idiom of silencing output unless of an error.
Types ¶
type GoPaths ¶ added in v0.0.47
type GoPaths struct {
// All collects Go source file paths.
All map[string]bool
// Regular collects non-unit-test Go source file paths.
Regular map[string]bool
// Test collects unit test Go source file paths.
Test map[string]bool
}
GoPaths models information about Go project source trees.