aboutsummaryrefslogtreecommitdiff
path: root/util.go
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-01-26 19:47:38 +0100
committerAlex Auvolat <alex@adnab.me>2020-01-26 19:47:38 +0100
commit94eafa2a9ba34d2cbcd678fff5a0dcbfcfa40e7c (patch)
tree7d0ed0515b5973591c64c7c9b4579b5575ac2010 /util.go
parentc1f0247586c98bbdfc42c4a8db3410d34dfbc500 (diff)
downloadbottin-94eafa2a9ba34d2cbcd678fff5a0dcbfcfa40e7c.tar.gz
bottin-94eafa2a9ba34d2cbcd678fff5a0dcbfcfa40e7c.zip
Less logs but better logs
Diffstat (limited to 'util.go')
-rw-r--r--util.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/util.go b/util.go
index 30f9681..d8ae58e 100644
--- a/util.go
+++ b/util.go
@@ -40,8 +40,9 @@ func consulToDN(key string) (string, string) {
}
dn = cpath + dn
}
- log.Printf("Consul key %s does not end with attribute=something", key)
- panic("TODO don't panic handle this")
+ // TODO don't panic, handle this
+ log.Panicf("Consul key %s does not end with attribute=something", key)
+ panic("unreachable")
}
func parseValue(value []byte) ([]string, error) {
@@ -64,7 +65,6 @@ func parseConsulResult(data []*consul.KVPair) (map[string]Entry, error) {
aggregator := map[string]Entry{}
for _, kv := range data {
- log.Printf("(parseConsulResult) %s %s", kv.Key, string(kv.Value))
dn, attr := consulToDN(kv.Key)
if _, exists := aggregator[dn]; !exists {
aggregator[dn] = Entry{}