mirror of https://bitbucket.org/ausocean/av.git
stream/mts/meta/meta.go: reduced verbosity of local vars in meta.Keys
This commit is contained in:
parent
ce92dd37d8
commit
dad70b37b4
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue