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.
|
||||
func Keys(d []byte) ([]string, error) {
|
||||
tmp, err := GetAll(d)
|
||||
m, err := GetAll(d)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
keys := make([]string, len(tmp))
|
||||
for i, entry := range tmp {
|
||||
keys[i] = entry[0]
|
||||
k := make([]string, len(m))
|
||||
for i, kv := range m {
|
||||
k[i] = kv[0]
|
||||
}
|
||||
return keys, nil
|
||||
return k, nil
|
||||
}
|
||||
|
||||
// Get returns the value for the given key in d.
|
||||
|
|
Loading…
Reference in New Issue