maybe fix out of bounds (#843)

This commit is contained in:
Zachary Rice authored and GitHub committed 2022-04-18 14:57:40 -05:00
1 parent 48b79facfa
commit d8cd93cabe
2 files changed
+7 -3

No files matched your search

+4 -1
View File
@@ -4,6 +4,7 @@ import (
_ "embed"
"fmt"
"regexp"
"strings"
)
//go:embed gitleaks.toml
@@ -64,7 +65,9 @@ func (vc *ViperConfig) Translate() (Config, error) {
if r.Keywords == nil {
r.Keywords = []string{}
} else {
keywords = append(keywords, r.Keywords...)
for _, k := range r.Keywords {
keywords = append(keywords, strings.ToLower(k))
}
}
if r.Tags == nil {