PutUint32Ascending encodes the uint32 value using a big-endian 4 byte representation at the specified index, lengthening the input slice if necessary.
(b []byte, v uint32, idx int)
| 210 | // representation at the specified index, lengthening the input slice if |
| 211 | // necessary. |
| 212 | func PutUint32Ascending(b []byte, v uint32, idx int) []byte { |
| 213 | for len(b) < idx+4 { |
| 214 | b = append(b, 0) |
| 215 | } |
| 216 | b[idx] = byte(v >> 24) |
| 217 | b[idx+1] = byte(v >> 16) |
| 218 | b[idx+2] = byte(v >> 8) |
| 219 | b[idx+3] = byte(v) |
| 220 | return b |
| 221 | } |
| 222 | |
| 223 | // EncodeUint32Descending encodes the uint32 value so that it sorts in |
| 224 | // reverse order, from largest to smallest. |
no outgoing calls
no test coverage detected
searching dependent graphs…