Skip to content

Commit 16553cf

Browse files
committed
Use string([]byte) for comparison
1 parent a0fc844 commit 16553cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

parser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func searchKeys(data []byte, keys ...string) int {
122122
if i < ln &&
123123
data[i] == ':' && // if string is a Key, and key level match
124124
keyLevel == level-1 && // If key nesting level match current object nested level
125-
keys[level-1] == unsafeBytesToString(data[keyBegin:keyEnd]) {
125+
keys[level-1] == string(data[keyBegin:keyEnd]) {
126126
keyLevel++
127127
// If we found all keys in path
128128
if keyLevel == lk {

0 commit comments

Comments
 (0)