diff options
author | Michael Muré <michael.mure@consensys.net> | 2018-11-21 18:56:12 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-03-01 22:35:36 +0100 |
commit | feab9412dffe5772048aad29893c4cb01d566387 (patch) | |
tree | b7bc9751f2ebdf8d41f5621bbf372eaf7625c4b9 /bridge/core | |
parent | 0aefae6fcca5786f2c898029c3d6282f760f2c63 (diff) | |
download | git-bug-feab9412dffe5772048aad29893c4cb01d566387.tar.gz |
WIP identity in git
Diffstat (limited to 'bridge/core')
-rw-r--r-- | bridge/core/bridge.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bridge/core/bridge.go b/bridge/core/bridge.go index 91ed5bfb..96646edb 100644 --- a/bridge/core/bridge.go +++ b/bridge/core/bridge.go @@ -15,6 +15,8 @@ import ( var ErrImportNorSupported = errors.New("import is not supported") var ErrExportNorSupported = errors.New("export is not supported") +const bridgeConfigKeyPrefix = "git-bug.bridge" + var bridgeImpl map[string]reflect.Type // Bridge is a wrapper around a BridgeImpl that will bind low-level @@ -114,12 +116,12 @@ func splitFullName(fullName string) (string, string, error) { // ConfiguredBridges return the list of bridge that are configured for the given // repo func ConfiguredBridges(repo repository.RepoCommon) ([]string, error) { - configs, err := repo.ReadConfigs("git-bug.bridge.") + configs, err := repo.ReadConfigs(bridgeConfigKeyPrefix + ".") if err != nil { return nil, errors.Wrap(err, "can't read configured bridges") } - re, err := regexp.Compile(`git-bug.bridge.([^.]+\.[^.]+)`) + re, err := regexp.Compile(bridgeConfigKeyPrefix + `.([^.]+\.[^.]+)`) if err != nil { panic(err) } |