Skip to content

Commit c889844

Browse files
authored
regexp: use iota instead of hardcoded values for regexType* (#679)
* regexp: use iota instead of hardcoded values
1 parent 91708ff commit c889844

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: regexp.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ type routeRegexpOptions struct {
2222
type regexpType int
2323

2424
const (
25-
regexpTypePath regexpType = 0
26-
regexpTypeHost regexpType = 1
27-
regexpTypePrefix regexpType = 2
28-
regexpTypeQuery regexpType = 3
25+
regexpTypePath regexpType = iota
26+
regexpTypeHost
27+
regexpTypePrefix
28+
regexpTypeQuery
2929
)
3030

3131
// newRouteRegexp parses a route template and returns a routeRegexp,

0 commit comments

Comments
 (0)