Update go dependencies
This commit is contained in:
parent
d5cf22c129
commit
063cc68d1c
1321 changed files with 52830 additions and 31081 deletions
12
vendor/github.com/json-iterator/go/iter_object.go
generated
vendored
12
vendor/github.com/json-iterator/go/iter_object.go
generated
vendored
|
|
@ -60,7 +60,7 @@ func (iter *Iterator) readFieldHash() int64 {
|
|||
if b == '\\' {
|
||||
iter.head = i
|
||||
for _, b := range iter.readStringSlowPath() {
|
||||
if 'A' <= b && b <= 'Z' {
|
||||
if 'A' <= b && b <= 'Z' && !iter.cfg.caseSensitive {
|
||||
b += 'a' - 'A'
|
||||
}
|
||||
hash ^= int64(b)
|
||||
|
|
@ -82,7 +82,7 @@ func (iter *Iterator) readFieldHash() int64 {
|
|||
}
|
||||
return hash
|
||||
}
|
||||
if 'A' <= b && b <= 'Z' {
|
||||
if 'A' <= b && b <= 'Z' && !iter.cfg.caseSensitive {
|
||||
b += 'a' - 'A'
|
||||
}
|
||||
hash ^= int64(b)
|
||||
|
|
@ -95,10 +95,14 @@ func (iter *Iterator) readFieldHash() int64 {
|
|||
}
|
||||
}
|
||||
|
||||
func calcHash(str string) int64 {
|
||||
func calcHash(str string, caseSensitive bool) int64 {
|
||||
hash := int64(0x811c9dc5)
|
||||
for _, b := range str {
|
||||
hash ^= int64(unicode.ToLower(b))
|
||||
if caseSensitive {
|
||||
hash ^= int64(b)
|
||||
} else {
|
||||
hash ^= int64(unicode.ToLower(b))
|
||||
}
|
||||
hash *= 0x1000193
|
||||
}
|
||||
return int64(hash)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue