diff options
author | Michael Muré <batolettre@gmail.com> | 2020-02-23 14:23:34 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-02-23 14:23:34 +0100 |
commit | dc21ad089295723ca95bf1b452d2f6f31c51c735 (patch) | |
tree | 396df7da8fc1fbcb8d4edd289c09bfe933c04c68 /bridge/gitlab | |
parent | b3318335986618388637a9d35d68b39633e4548a (diff) | |
download | git-bug-dc21ad089295723ca95bf1b452d2f6f31c51c735.tar.gz |
use regex.MustCompile instead of dealing with the error
Diffstat (limited to 'bridge/gitlab')
-rw-r--r-- | bridge/gitlab/config.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/bridge/gitlab/config.go b/bridge/gitlab/config.go index b730a365..d5dc418c 100644 --- a/bridge/gitlab/config.go +++ b/bridge/gitlab/config.go @@ -183,10 +183,7 @@ func promptToken(baseUrl string) (*auth.Token, error) { fmt.Println("'api' access scope: to be able to make api calls") fmt.Println() - re, err := regexp.Compile(`^[a-zA-Z0-9\-\_]{20}$`) - if err != nil { - panic("regexp compile:" + err.Error()) - } + re := regexp.MustCompile(`^[a-zA-Z0-9\-\_]{20}$`) var login string |