replace backend strings with consts

This commit is contained in:
Stephan Müller 2019-04-19 17:43:13 +02:00
parent c484f77326
commit cf0a60d26c
No known key found for this signature in database
GPG Key ID: 4650F39E5B5E1894

10
main.go
View File

@ -109,18 +109,18 @@ func main() {
storeConfig.Token = cmd.Flag("source.kv.consul.token").Value.String() storeConfig.Token = cmd.Flag("source.kv.consul.token").Value.String()
switch source { switch source {
case "file": case FILE:
config.BackendConfig = FileBackend{ config.BackendConfig = FileBackend{
Name: FILE, Name: FILE,
Path: acmeFile, Path: acmeFile,
} }
case "consul": case CONSUL:
fallthrough fallthrough
case "etcd": case ETCD:
fallthrough fallthrough
case "zookeeper": case ZOOKEEPER:
fallthrough fallthrough
case "boltdb": case BOLTDB:
fallthrough fallthrough
default: default:
config.BackendConfig = KVBackend{ config.BackendConfig = KVBackend{