fix versionMatcher: use non-capturing group (?:-dirty)? for gorilla/mux
gorilla/mux explicitly rejects capturing groups () in route regexps, only non-capturing groups (?:) are allowed. The original regex was missing the ? to make -dirty optional. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,7 @@ import (
|
||||
|
||||
// versionMatcher defines a variable matcher to be parsed by the router
|
||||
// when a request is about to be served.
|
||||
const versionMatcher = "/v{version:[0-9.]+(-dirty)?}"
|
||||
const versionMatcher = "/v{version:[0-9.]+(?:-dirty)?}"
|
||||
|
||||
// Config provides the configuration for the API server
|
||||
type Config struct {
|
||||
|
||||
Reference in New Issue
Block a user