A headerSorter implements sort.Interface by sorting a []keyValues by key. It's used as a pointer, so it can fit in a sort.Interface interface value without allocation.
| 28 | // by key. It's used as a pointer, so it can fit in a sort.Interface |
| 29 | // interface value without allocation. |
| 30 | type headerSorter struct { |
| 31 | kvs []header.KeyValues |
| 32 | } |
| 33 | |
| 34 | func (s *headerSorter) Len() int { return len(s.kvs) } |
| 35 | func (s *headerSorter) Swap(i, j int) { s.kvs[i], s.kvs[j] = s.kvs[j], s.kvs[i] } |
nothing calls this directly
no outgoing calls
no test coverage detected