Documentation ¶
Index ¶
- func DefineTasks(opts ...Option)
- func RegisterFormatTask(task *goyek.DefinedTask)
- func RegisterGenerateTask(task *goyek.DefinedTask)
- func RegisterLintTask(task *goyek.DefinedTask)
- func RegisterTestTask(task *goyek.DefinedTask)
- type Option
- func ArtifactsPath(path string) Option
- func ExcludeTasks(task ...string) Option
- func Tags(tags ...string) Option
- func VersionActionlint(version string) Option
- func VersionGoPrettier(version string) Option
- func VersionGoShellcheck(version string) Option
- func VersionGoYamllint(version string) Option
- func VersionGolangCILint(version string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefineTasks ¶
func DefineTasks(opts ...Option)
DefineTasks defines common tasks for Go projects.
func RegisterFormatTask ¶
func RegisterFormatTask(task *goyek.DefinedTask)
RegisterFormatTask adds a task that should be run during the format command.
func RegisterGenerateTask ¶
func RegisterGenerateTask(task *goyek.DefinedTask)
RegisterGenerateTask adds a task that should be run during the generate command.
func RegisterLintTask ¶
func RegisterLintTask(task *goyek.DefinedTask)
RegisterLintTask adds a task that should be run during the lint command.
func RegisterTestTask ¶
func RegisterTestTask(task *goyek.DefinedTask)
RegisterTestTask adds a task that should be run during the test command.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is a configuration option for DefineTasks.
func ArtifactsPath ¶
ArtifactPath returns an Option to indicate the path to write temporary build artifacts to, for example coverage reports. If not provided, the default is "out".
func ExcludeTasks ¶
ExcludeTasks returns an Option to exclude tasks normally added by default. This can be used to avoid unneeded tasks, for example to disable linting of Markdown while still keeping the ability to manually autoformat it, or to redefine a task with a different implementation.
func Tags ¶
Tags returns an Option to add build tags to Go lint tasks. If any code is guarded by a build tag from default compilation, it should be added here to ensure it is linted.
func VersionActionlint ¶
VersionActionlint returns an Option to set the version of actionlint to use. If unset, a default version is used which may not be the latest.
func VersionGoPrettier ¶
VersionGoPrettier returns an Option to set the version of go-prettier to use. If unset, a default version is used which may not be the latest.
func VersionGoShellcheck ¶
VersionGoShellcheck returns an Option to set the version of go-shellcheck to use. If unset, a default version is used which may not be the latest.
func VersionGoYamllint ¶
VersionGoYamllint returns an Option to set the version of go-yamllint to use. If unset, a default version is used which may not be the latest.
func VersionGolangCILint ¶
VersionGolangCILint returns an Option to set the version of golangci-lint to use. If unset, a default version is used which may not be the latest.