Use method instead of function

This commit is contained in:
2025-01-31 10:13:02 -05:00
parent 037ac75ea6
commit ac05bceda3

@@ -121,7 +121,7 @@ func main() {
} }
matchIndices := make([]reg.Match, 0) matchIndices := make([]reg.Match, 0)
if matchNumFlagEnabled { if matchNumFlagEnabled {
tmp, err := reg.FindNthMatch(regComp, test_str, *matchNum) tmp, err := regComp.FindNthMatch(test_str, *matchNum)
if err == nil { if err == nil {
matchIndices = append(matchIndices, tmp) matchIndices = append(matchIndices, tmp)
} }