simplify getmanybytes

This commit is contained in:
Josh Baker 2017-12-22 07:19:48 -07:00
parent 62ee2064df
commit 5cd723d566
1 changed files with 1 additions and 5 deletions

View File

@ -1610,11 +1610,7 @@ func GetMany(json string, path ...string) []Result {
// The return value is a Result array where the number of items // The return value is a Result array where the number of items
// will be equal to the number of input paths. // will be equal to the number of input paths.
func GetManyBytes(json []byte, path ...string) []Result { func GetManyBytes(json []byte, path ...string) []Result {
res := make([]Result, len(path)) return GetMany(string(json), path...)
for i, path := range path {
res[i] = GetBytes(json, path)
}
return res
} }
var fieldsmu sync.RWMutex var fieldsmu sync.RWMutex