-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow adding more tasks to meta tasks (#3)
- Loading branch information
1 parent
5a4b64f
commit a301ee0
Showing
2 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package build | ||
|
||
import "github.com/goyek/goyek/v2" | ||
|
||
var ( | ||
formatTasks goyek.Deps | ||
generateTasks goyek.Deps | ||
lintTasks goyek.Deps | ||
) | ||
|
||
// RegisterFormatTask adds a task that should be run during the format command. | ||
func RegisterFormatTask(task *goyek.DefinedTask) { | ||
formatTasks = append(formatTasks, task) | ||
} | ||
|
||
// RegisterGenerateTask adds a task that should be run during the generate command. | ||
func RegisterGenerateTask(task *goyek.DefinedTask) { | ||
generateTasks = append(generateTasks, task) | ||
} | ||
|
||
// RegisterLintTask adds a task that should be run during the lint command. | ||
func RegisterLintTask(task *goyek.DefinedTask) { | ||
lintTasks = append(lintTasks, task) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters