diff options
author | Alex Auvolat <alex@adnab.me> | 2020-01-26 19:47:38 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-01-26 19:47:38 +0100 |
commit | 94eafa2a9ba34d2cbcd678fff5a0dcbfcfa40e7c (patch) | |
tree | 7d0ed0515b5973591c64c7c9b4579b5575ac2010 /util.go | |
parent | c1f0247586c98bbdfc42c4a8db3410d34dfbc500 (diff) | |
download | bottin-94eafa2a9ba34d2cbcd678fff5a0dcbfcfa40e7c.tar.gz bottin-94eafa2a9ba34d2cbcd678fff5a0dcbfcfa40e7c.zip |
Less logs but better logs
Diffstat (limited to 'util.go')
-rw-r--r-- | util.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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{} |