aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/core/auth
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-02-23 14:23:34 +0100
committerMichael Muré <batolettre@gmail.com>2020-02-23 14:23:34 +0100
commitdc21ad089295723ca95bf1b452d2f6f31c51c735 (patch)
tree396df7da8fc1fbcb8d4edd289c09bfe933c04c68 /bridge/core/auth
parentb3318335986618388637a9d35d68b39633e4548a (diff)
downloadgit-bug-dc21ad089295723ca95bf1b452d2f6f31c51c735.tar.gz
use regex.MustCompile instead of dealing with the error
Diffstat (limited to 'bridge/core/auth')
-rw-r--r--bridge/core/auth/credential.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/bridge/core/auth/credential.go b/bridge/core/auth/credential.go
index 2814e94c..d95b23c7 100644
--- a/bridge/core/auth/credential.go
+++ b/bridge/core/auth/credential.go
@@ -171,10 +171,7 @@ func List(repo repository.RepoConfig, opts ...Option) ([]Credential, error) {
return nil, err
}
- re, err := regexp.Compile(`^` + configKeyPrefix + `\.([^.]+)\.([^.]+(?:\.[^.]+)*)$`)
- if err != nil {
- panic(err)
- }
+ re := regexp.MustCompile(`^` + configKeyPrefix + `\.([^.]+)\.([^.]+(?:\.[^.]+)*)$`)
mapped := make(map[string]map[string]string)