Documentation ¶
Index ¶
- func Clean(files []string)
- func Format(a *goyek.A) bool
- func Generate(a *goyek.A) bool
- func GenerateCoverageReport(a *goyek.A, file string) bool
- func GenerateDocumentation(a *goyek.A, excludedDirs []string) bool
- func Install(a *goyek.A, packageName string) bool
- func Lint(a *goyek.A) bool
- func MakeCmdOptions(b *bytes.Buffer) []cmd.Option
- func NilAway(a *goyek.A) bool
- func RunCommand(a *goyek.A, command string) bool
- func UnitTests(a *goyek.A) bool
- func UpdateDependencies(a *goyek.A) bool
- func VulnerabilityCheck(a *goyek.A) bool
- func WorkingDir() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clean ¶
func Clean(files []string)
Clean deletes the named files, which must be located in, or in a subdirectory of, WorkingDir(). If any of the named files contains a back directory (".."), calls os.Exit()
func Format ¶
func Format(a *goyek.A) bool
Format runs the gofmt tool to repair the formatting of each source file; returns false if the command fails
func GenerateCoverageReport ¶
GenerateCoverageReport runs the unit tests, generating a coverage profile; if the unit tests all succeed, generates the report as HTML to be displayed in the current browser window. Returns false if either the unit tests or the coverage report display fails
func GenerateDocumentation ¶
GenerateDocumentation generates documentation of the code, outputting it to stdout; returns false on error
func Install ¶
Install runs the command to install the '@latest' version of a specified package; returns false on failure
func Lint ¶
func Lint(a *goyek.A) bool
Lint runs lint on the source code after making sure that the lint tool is up to date; returns false on failure
func MakeCmdOptions ¶
MakeCmdOptions creates a slice of cmd.Option instances consisting of the working directory, stderr (using the provided buffer), and stdout (using the same provided buffer)
func NilAway ¶
func NilAway(a *goyek.A) bool
NilAway runs the nilaway tool, which attempts, via static analysis, to detect potential nil access errors; returns false on errors
func RunCommand ¶
RunCommand runs a command and displays all of its output; returns true on success
func UnitTests ¶
func UnitTests(a *goyek.A) bool
UnitTests runs all unit tests, with code coverage enabled; returns false on failure
func UpdateDependencies ¶ added in v0.3.0
func UpdateDependencies(a *goyek.A) bool
UpdateDependencies updates module dependencies and prunes the modified go.mod and go.sum files
func VulnerabilityCheck ¶
func VulnerabilityCheck(a *goyek.A) bool
VulnerabilityCheck runs the govulncheck tool, which checks for unresolved known vulnerabilities in the libraries used; returns false on failure
func WorkingDir ¶
func WorkingDir() string
WorkingDir returns a best guess of the working directory. If the directory found is not, in fact, a directory, or is, but does not contain a .git subdirectory, calls exit. A successful call's value is cached.
Types ¶
This section is empty.