fspath: remove unused capture group in remote name regex

This commit is contained in:
albertony
2022-12-12 13:24:32 +00:00
committed by Nick Craig-Wood
parent 04a663829b
commit c571200812
+2 -2
View File
@@ -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