From e171448902867ed411906cc7db757804473a10ef Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 4 Dec 2018 23:43:57 +0100 Subject: bridge: simplify regex --- bridge/core/bridge.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bridge/core/bridge.go') diff --git a/bridge/core/bridge.go b/bridge/core/bridge.go index 96e959af..91ed5bfb 100644 --- a/bridge/core/bridge.go +++ b/bridge/core/bridge.go @@ -119,7 +119,7 @@ func ConfiguredBridges(repo repository.RepoCommon) ([]string, error) { return nil, errors.Wrap(err, "can't read configured bridges") } - re, err := regexp.Compile(`git-bug.bridge.([^\.]+\.[^\.]+)`) + re, err := regexp.Compile(`git-bug.bridge.([^.]+\.[^.]+)`) if err != nil { panic(err) } @@ -149,7 +149,7 @@ func ConfiguredBridges(repo repository.RepoCommon) ([]string, error) { // Remove a configured bridge func RemoveBridge(repo repository.RepoCommon, fullName string) error { - re, err := regexp.Compile(`^[^\.]+\.[^\.]+$`) + re, err := regexp.Compile(`^[^.]+\.[^.]+$`) if err != nil { panic(err) } -- cgit