Skip to content

Commit

Permalink
findRule
Browse files Browse the repository at this point in the history
```
benchmark                         old ns/op     new ns/op     delta
BenchmarkParseFromStatus401-4     23.9          23.8          -0.42%
BenchmarkParseFromString002-4     311424        310809        -0.20%
BenchmarkParseFromString001-4     86707         86562         -0.17%
```
  • Loading branch information
moredure authored Mar 3, 2021
1 parent 87d22cd commit 0b2f4c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion robotstxt.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func (g *Group) findRule(path string) (ret *rule) {
// From Google's spec:
// The order of precedence for rules with wildcards is undefined.
if l := len(r.pattern.String()); l > prefixLen {
prefixLen = len(r.pattern.String())
prefixLen = l
ret = r
}
}
Expand Down

0 comments on commit 0b2f4c4

Please sign in to comment.