Skip to content

Commit 93684e3

Browse files
committed
Fix mistakes in readme
1 parent fa25d4d commit 93684e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ fmt.Println(match)
116116
//=> <nil>
117117

118118
tokens = make([]pathToRegexp.Token, 0)
119-
regexpWord := pathToRegexp("/(user|u)", &tokens, nil)
119+
regexpWord := pathToRegexp.Must(pathToRegexp.PathToRegexp("/(user|u)", &tokens, nil))
120120
// tokens: [{Name:0, Prefix:"/", Suffix:"", Pattern:"user|u", Modifier:""}]
121121

122122
match, _ = regexpWord.FindStringMatch("/u")

0 commit comments

Comments
 (0)