aboutsummaryrefslogtreecommitdiff
path: root/util.go
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-03-09 18:30:59 +0100
committerAlex Auvolat <alex@adnab.me>2021-03-09 18:30:59 +0100
commit1a20a64eff34336789c0e3b41db1de727e3fe998 (patch)
tree27e32e575eeace4260f21f76969f6e1ab5c8b5c2 /util.go
parentdc3fd4df659bb35d7858714a429fc797bf5f1222 (diff)
downloadbottin-1a20a64eff34336789c0e3b41db1de727e3fe998.tar.gz
bottin-1a20a64eff34336789c0e3b41db1de727e3fe998.zip
Refactoring
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 95ad102..30d7a67 100644
--- a/util.go
+++ b/util.go
@@ -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
}