MCPcopy Index your code
hub / github.com/expr-lang/expr / Less

Method Less

internal/spew/common.go:326–331  ·  view source on GitHub ↗

Less returns whether the value at index i should sort before the value at index j. It is part of the sort.Interface implementation.

(i, j int)

Source from the content-addressed store, hash-verified

324// Less returns whether the value at index i should sort before the
325// value at index j. It is part of the sort.Interface implementation.
326func (s *valuesSorter) Less(i, j int) bool {
327 if s.strings == nil {
328 return valueSortLess(s.values[i], s.values[j])
329 }
330 return s.strings[i] < s.strings[j]
331}
332
333// sortValues is a sort function that handles both native types and any type that
334// can be converted to error or Stringer. Other inputs are sorted according to

Callers

nothing calls this directly

Calls 1

valueSortLessFunction · 0.85

Tested by

no test coverage detected