diff options
Diffstat (limited to 'internal/source')
| -rw-r--r-- | internal/source/source.go | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/internal/source/source.go b/internal/source/source.go index 8c3d340c..b30ccc3b 100644 --- a/internal/source/source.go +++ b/internal/source/source.go @@ -28,6 +28,7 @@ import ( "path" "path/filepath" "regexp" + "slices" "strconv" "strings" @@ -748,13 +749,7 @@ func init() { for i := range patterns { re := regexp.MustCompile(patterns[i].pattern) // The pattern regexp must contain a group named "repo". - found := false - for _, n := range re.SubexpNames() { - if n == "repo" { - found = true - break - } - } + found := slices.Contains(re.SubexpNames(), "repo") if !found { panic(fmt.Sprintf("pattern %s missing <repo> group", patterns[i].pattern)) } |
