EncodeJSONArrayKeyMarker adds a JSON Array key encoding marker to buf and returns the new buffer.
(buf []byte, dir Direction, arrayLength int64)
| 3587 | // EncodeJSONArrayKeyMarker adds a JSON Array key encoding marker |
| 3588 | // to buf and returns the new buffer. |
| 3589 | func EncodeJSONArrayKeyMarker(buf []byte, dir Direction, arrayLength int64) []byte { |
| 3590 | switch dir { |
| 3591 | case Ascending: |
| 3592 | if arrayLength == 0 { |
| 3593 | return append(buf, jsonEmptyArrayKeyMarker) |
| 3594 | } |
| 3595 | return append(buf, jsonArrayKeyMarker) |
| 3596 | case Descending: |
| 3597 | if arrayLength == 0 { |
| 3598 | return append(buf, jsonEmptyArrayKeyDescendingMarker) |
| 3599 | } |
| 3600 | return append(buf, jsonArrayKeyDescendingMarker) |
| 3601 | default: |
| 3602 | panic("invalid direction") |
| 3603 | } |
| 3604 | } |
| 3605 | |
| 3606 | // EncodeJSONKeyTerminator adds a JSON Key terminator |
| 3607 | // to buf and returns the buffer. |
no outgoing calls
no test coverage detected
searching dependent graphs…