MCPcopy Create free account
hub / github.com/lxn/walk / Less

Method Less

reflectmodels.go:302–316  ·  view source on GitHub ↗
(i, j int)

Source from the content-addressed store, hash-verified

300}
301
302func (m *reflectTableModel) Less(i, j int) bool {
303 col := m.SortedColumn()
304
305 if lt := m.lessFuncs[col]; lt != nil {
306 ls := lt(i, j)
307
308 if m.SortOrder() == SortAscending {
309 return ls
310 } else {
311 return !ls
312 }
313 }
314
315 return less(m.Value(i, col), m.Value(j, col), m.SortOrder())
316}
317
318func (m *reflectTableModel) Swap(i, j int) {
319 vi := m.value.Index(i)

Callers

nothing calls this directly

Calls 4

SortedColumnMethod · 0.95
SortOrderMethod · 0.95
ValueMethod · 0.95
lessFunction · 0.85

Tested by

no test coverage detected