stream/mts/meta/meta.go: reduced verbosity of local vars in meta.Keys

This commit is contained in:
saxon 2019-02-11 14:30:37 +10:30
parent ce92dd37d8
commit dad70b37b4
1 changed files with 5 additions and 5 deletions

View File

@ -166,15 +166,15 @@ func (m *Data) Encode() []byte {
// Keys returns all keys in a slice of metadata d. // Keys returns all keys in a slice of metadata d.
func Keys(d []byte) ([]string, error) { func Keys(d []byte) ([]string, error) {
tmp, err := GetAll(d) m, err := GetAll(d)
if err != nil { if err != nil {
return nil, err return nil, err
} }
keys := make([]string, len(tmp)) k := make([]string, len(m))
for i, entry := range tmp { for i, kv := range m {
keys[i] = entry[0] k[i] = kv[0]
} }
return keys, nil return k, nil
} }
// Get returns the value for the given key in d. // Get returns the value for the given key in d.