(encoded []byte, firstKey string)
| 457 | } |
| 458 | |
| 459 | func EncodedStringArrayHasFirstVal(encoded []byte, firstKey string) bool { |
| 460 | firstKeyBytes := NullEncodeStr(firstKey) |
| 461 | if !bytes.HasPrefix(encoded, firstKeyBytes) { |
| 462 | return false |
| 463 | } |
| 464 | if len(encoded) == len(firstKeyBytes) || encoded[len(firstKeyBytes)] == nullEncodeSepByte { |
| 465 | return true |
| 466 | } |
| 467 | return false |
| 468 | } |
| 469 | |
| 470 | // on encoding error returns "" |
| 471 | // this is used to perform logic on first value without decoding the entire array |
nothing calls this directly
no test coverage detected