sort.go
func (s *SortFilter) Text(n int) *SortFilter {
	s.add(func(a, b string) int {
		a1, a2 := column(a, n)
		b1, b2 := column(b, n)
		switch {
		case a1 < b1:
			return -1
		case a1 > b1:
			return +1
		case a2 < b2:
			return -1
		case a2 > b2:
			return +1
		}
		return 0
	})
	return s
}
func (s *SortFilter) Text(n int) *SortFilter {
	s.add(func(a, b string) int {
		a1, a2 := column(a, n)
		b1, b2 := column(b, n)
		switch {
		case a1 < b1:
			return -1
		case a1 > b1:
			return +1
		case a2 < b2:
			return -1
		case a2 > b2:
			return +1
		}
		return 0
	})
	return s
}
func ( s * SortFilter ) Text ( n int ) * SortFilter { s . add ( func ( a , b string ) int { a1 , a2 := column ( a , n ) b1 , b2 := column ( b , n ) switch { case a1 < b1 : return - 1 case a1 > b1 : return + 1 case a2 < b2 : return - 1 case a2 > b2 : return + 1 } return 0 } ) return s }
// Text sets the next sort key to sort by column n in lexicographic
// order. Column 0 means the entire string. Items that do not have
// column n sort to the front.
Text sets the next sort key to sort by column n in lexicographic order . Column 0 means the entire string . Items that do not have column n sort to the front .