fix: move the allowedTypes to init for testing

This commit is contained in:
Kekskurse 2023-07-24 13:29:01 +02:00
parent a84f6cd4ce
commit 117565a63f
Signed by: kekskurse
GPG key ID: 728ACCB59341E7E4
2 changed files with 3 additions and 2 deletions

Binary file not shown.

View file

@ -17,9 +17,10 @@ var (
var allowedTypes []string
func main() {
func init() {
allowedTypes = append(allowedTypes, "fix", "feat", "build", "chore", "ci", "docs", "style", "refactor", "perf", "test")
}
func main() {
commitMsg, err := getCommitMessageFromFile(os.Args[1])
if err != nil {
log.Fatal("Error parsing commitMsg: ", err)