minor optimization

This commit is contained in:
Josh Baker 2016-08-11 09:44:22 -07:00
parent e8de6d537f
commit 61a9ab4ee0
1 changed files with 1 additions and 6 deletions

View File

@ -1572,11 +1572,6 @@ func IndexJSONCaseSensitive(path string) func(a, b string) bool {
func jsonIndex(cs bool, path string) func(a, b string) bool { func jsonIndex(cs bool, path string) func(a, b string) bool {
return func(a, b string) bool { return func(a, b string) bool {
atok := gjson.Get(a, path) return gjson.Get(a, path).Less(gjson.Get(b, path), cs)
btok := gjson.Get(b, path)
if atok.Less(btok, cs) {
return true
}
return false
} }
} }