(buf []byte, dir encoding.Direction)
| 2049 | } |
| 2050 | |
| 2051 | func (j jsonNumber) EncodeForwardIndex(buf []byte, dir encoding.Direction) ([]byte, error) { |
| 2052 | buf = encoding.EncodeJSONNumberKeyMarker(buf, dir) |
| 2053 | var dec = apd.Decimal(j) |
| 2054 | switch dir { |
| 2055 | case encoding.Ascending: |
| 2056 | buf = encoding.EncodeDecimalAscending(buf, &dec) |
| 2057 | case encoding.Descending: |
| 2058 | buf = encoding.EncodeDecimalDescending(buf, &dec) |
| 2059 | default: |
| 2060 | return nil, errors.AssertionFailedf("invalid direction") |
| 2061 | } |
| 2062 | buf = encoding.EncodeJSONKeyTerminator(buf, dir) |
| 2063 | return buf, nil |
| 2064 | } |
| 2065 | |
| 2066 | func (j jsonFalse) EncodeForwardIndex(buf []byte, dir encoding.Direction) ([]byte, error) { |
| 2067 | buf = encoding.EncodeJSONFalseKeyMarker(buf, dir) |
nothing calls this directly
no test coverage detected