Skip to content

Commit b19bba3

Browse files
committed
update match regex main
1 parent e79343d commit b19bba3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ussd/builder.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,12 @@ func (s *Step) walk(ussdParts []string) *Step {
9191

9292
// check any item that matches the input as a regex
9393
for _, child := range s.Children {
94-
if match, _ := regexp.MatchString(child.Key, ussdParts[0]); match {
94+
match, err := regexp.MatchString(child.Key, ussdParts[0])
95+
if err != nil {
96+
continue
97+
}
98+
99+
if match {
95100
return child.walk(ussdParts[1:])
96101
}
97102
}

0 commit comments

Comments
 (0)