DecodeTimeAscending decodes a time.Time value which was encoded using EncodeTime. The remainder of the input buffer and the decoded time.Time are returned.
(b []byte)
| 1228 | // EncodeTime. The remainder of the input buffer and the decoded |
| 1229 | // time.Time are returned. |
| 1230 | func DecodeTimeAscending(b []byte) ([]byte, time.Time, error) { |
| 1231 | b, sec, nsec, err := decodeTime(b) |
| 1232 | if err != nil { |
| 1233 | return b, time.Time{}, err |
| 1234 | } |
| 1235 | return b, timeutil.Unix(sec, nsec), nil |
| 1236 | } |
| 1237 | |
| 1238 | // DecodeTimeDescending is the descending version of DecodeTimeAscending. |
| 1239 | func DecodeTimeDescending(b []byte) ([]byte, time.Time, error) { |
no test coverage detected
searching dependent graphs…