aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/launchpad/config.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-07-07 11:10:58 +0200
committerMichael Muré <batolettre@gmail.com>2019-07-07 11:10:58 +0200
commit5b1a8cdefa9516d215f99ee114d451c96997f34a (patch)
tree4ea25748b689f527b85000c02139fa09f4145168 /bridge/launchpad/config.go
parent41a5a7fc1a2e2b8e379e129815336fb1fb3de828 (diff)
downloadgit-bug-5b1a8cdefa9516d215f99ee114d451c96997f34a.tar.gz
bridge: use a single KeyTarget constant for all bridges
Diffstat (limited to 'bridge/launchpad/config.go')
-rw-r--r--bridge/launchpad/config.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/bridge/launchpad/config.go b/bridge/launchpad/config.go
index c02fd16d..1d6c8aba 100644
--- a/bridge/launchpad/config.go
+++ b/bridge/launchpad/config.go
@@ -19,7 +19,6 @@ var ErrBadProjectURL = errors.New("bad Launchpad project URL")
const (
target = "launchpad-preview"
keyProject = "project"
- keyTarget = "target"
defaultTimeout = 60 * time.Second
)
@@ -63,7 +62,7 @@ func (*Launchpad) Configure(repo repository.RepoCommon, params core.BridgeParams
}
conf[keyProject] = project
- conf[keyTarget] = target
+ conf[core.KeyTarget] = target
return conf, nil
}
@@ -72,8 +71,8 @@ func (*Launchpad) ValidateConfig(conf core.Configuration) error {
return fmt.Errorf("missing %s key", keyProject)
}
- if _, ok := conf[keyTarget]; !ok {
- return fmt.Errorf("missing %s key", keyTarget)
+ if _, ok := conf[core.KeyTarget]; !ok {
+ return fmt.Errorf("missing %s key", core.KeyTarget)
}
return nil