(buf []byte, dir encoding.Direction)
| 2034 | } |
| 2035 | |
| 2036 | func (j jsonString) EncodeForwardIndex(buf []byte, dir encoding.Direction) ([]byte, error) { |
| 2037 | buf = encoding.EncodeJSONStringKeyMarker(buf, dir) |
| 2038 | |
| 2039 | switch dir { |
| 2040 | case encoding.Ascending: |
| 2041 | buf = encoding.EncodeStringAscending(buf, string(j)) |
| 2042 | case encoding.Descending: |
| 2043 | buf = encoding.EncodeStringDescending(buf, string(j)) |
| 2044 | default: |
| 2045 | return nil, errors.AssertionFailedf("invalid direction") |
| 2046 | } |
| 2047 | buf = encoding.EncodeJSONKeyTerminator(buf, dir) |
| 2048 | return buf, nil |
| 2049 | } |
| 2050 | |
| 2051 | func (j jsonNumber) EncodeForwardIndex(buf []byte, dir encoding.Direction) ([]byte, error) { |
| 2052 | buf = encoding.EncodeJSONNumberKeyMarker(buf, dir) |
nothing calls this directly
no test coverage detected