stripNonJSONPrefix removes the non-JSON prefix byte and returns the kind and the remainder of the byte slice.
(data []byte)
| 38 | |
| 39 | // stripNonJSONPrefix removes the non-JSON prefix byte and returns the kind and the remainder of the byte slice. |
| 40 | func stripNonJSONPrefix(data []byte) (kind nonJSONPrefix, body []byte) { |
| 41 | if len(data) <= 1 { |
| 42 | return nonJSONPrefixKindUnknown, nil |
| 43 | } |
| 44 | return nonJSONPrefix(data[0]), data[1:] |
| 45 | } |
| 46 | |
| 47 | // setOldRevisionJSONPtr stores a pointer from the old revision's RevTreeID to the Current Version hash used to fetch the body. |
| 48 | func (db *DatabaseCollectionWithUser) setOldRevisionJSONPtr(ctx context.Context, doc *Document, expiry uint32) error { |
no test coverage detected