Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 5ba8b59

Browse files
committed
Prevent regex from panicking
1 parent b56f371 commit 5ba8b59

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internals/secrethub/migrate_config_templates.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ func migrateTemplateTags(inFile io.Reader, outFile string, mapping referenceMapp
5656
var hits, misses []string
5757
output := regexpSecretTemplateTags.ReplaceAllStringFunc(string(raw), func(templateTag string) string {
5858
path := regexpSecretTemplateTags.FindStringSubmatch(templateTag)
59-
fmt.Println(path)
60-
if path[1] == "" {
59+
60+
if path == nil {
6161
misses = append(misses, templateTag)
6262
return ""
6363
}

0 commit comments

Comments
 (0)