Swap swaps the values at the passed indices. It is part of the sort.Interface implementation.
(i, j int)
| 283 | // Swap swaps the values at the passed indices. It is part of the |
| 284 | // sort.Interface implementation. |
| 285 | func (s *valuesSorter) Swap(i, j int) { |
| 286 | s.values[i], s.values[j] = s.values[j], s.values[i] |
| 287 | if s.strings != nil { |
| 288 | s.strings[i], s.strings[j] = s.strings[j], s.strings[i] |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | // valueSortLess returns whether the first value should sort before the second |
| 293 | // value. It is used by valueSorter.Less as part of the sort.Interface |
nothing calls this directly
no outgoing calls
no test coverage detected