forked from mirror/buntdb
minor optimization
This commit is contained in:
parent
e8de6d537f
commit
61a9ab4ee0
|
@ -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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue