forked from TrueCloudLab/rclone
fspath: remove unused capture group in remote name regex
This commit is contained in:
parent
04a663829b
commit
c571200812
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
configNameRe = `[\w. -]+`
|
configNameRe = `[\w. -]+`
|
||||||
remoteNameRe = `(:?` + configNameRe + `)`
|
remoteNameRe = `:?` + configNameRe
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -35,7 +35,7 @@ var (
|
||||||
configNameMatcher = regexp.MustCompile(`^` + configNameRe + `$`)
|
configNameMatcher = regexp.MustCompile(`^` + configNameRe + `$`)
|
||||||
|
|
||||||
// remoteNameMatcher is a pattern to match an rclone remote name at the start of a config
|
// remoteNameMatcher is a pattern to match an rclone remote name at the start of a config
|
||||||
remoteNameMatcher = regexp.MustCompile(`^` + remoteNameRe + `(:$|,)`)
|
remoteNameMatcher = regexp.MustCompile(`^` + remoteNameRe + `(?::$|,)`)
|
||||||
)
|
)
|
||||||
|
|
||||||
// CheckConfigName returns an error if configName is invalid
|
// CheckConfigName returns an error if configName is invalid
|
||||||
|
|
Loading…
Add table
Reference in a new issue