fix: move the allowedTypes to init for testing
This commit is contained in:
parent
a84f6cd4ce
commit
117565a63f
2 changed files with 3 additions and 2 deletions
BIN
commit-msg
BIN
commit-msg
Binary file not shown.
5
main.go
5
main.go
|
@ -17,9 +17,10 @@ var (
|
||||||
|
|
||||||
var allowedTypes []string
|
var allowedTypes []string
|
||||||
|
|
||||||
func main() {
|
func init() {
|
||||||
allowedTypes = append(allowedTypes, "fix", "feat", "build", "chore", "ci", "docs", "style", "refactor", "perf", "test")
|
allowedTypes = append(allowedTypes, "fix", "feat", "build", "chore", "ci", "docs", "style", "refactor", "perf", "test")
|
||||||
|
}
|
||||||
|
func main() {
|
||||||
commitMsg, err := getCommitMessageFromFile(os.Args[1])
|
commitMsg, err := getCommitMessageFromFile(os.Args[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("Error parsing commitMsg: ", err)
|
log.Fatal("Error parsing commitMsg: ", err)
|
||||||
|
|
Loading…
Reference in a new issue