diff options
author | Alex Auvolat <alex@adnab.me> | 2021-03-09 18:30:59 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-03-09 18:30:59 +0100 |
commit | 1a20a64eff34336789c0e3b41db1de727e3fe998 (patch) | |
tree | 27e32e575eeace4260f21f76969f6e1ab5c8b5c2 /util.go | |
parent | dc3fd4df659bb35d7858714a429fc797bf5f1222 (diff) | |
download | bottin-1a20a64eff34336789c0e3b41db1de727e3fe998.tar.gz bottin-1a20a64eff34336789c0e3b41db1de727e3fe998.zip |
Refactoring
Diffstat (limited to 'util.go')
-rw-r--r-- | util.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -64,15 +64,15 @@ func parseValue(value []byte) ([]string, error) { func parseConsulResult(data []*consul.KVPair) (map[string]Entry, error) { aggregator := map[string]Entry{} - for _, kv := range data { - dn, attr, err := consulToDN(kv.Key) + for _, pair := range data { + dn, attr, err := consulToDN(pair.Key) if err != nil { continue } if _, exists := aggregator[dn]; !exists { aggregator[dn] = Entry{} } - value, err := parseValue(kv.Value) + value, err := parseValue(pair.Value) if err != nil { return nil, err } |