MCPcopy
hub / github.com/cloudfoundry/cli / SortAlphabeticFunc

Function SortAlphabeticFunc

util/sorting/alphabetic.go:38–42  ·  view source on GitHub ↗

SortAlphabeticFunc returns a `less()` comparator for sorting strings while respecting case.

(list []string)

Source from the content-addressed store, hash-verified

36// SortAlphabeticFunc returns a `less()` comparator for sorting strings while
37// respecting case.
38func SortAlphabeticFunc(list []string) func(i, j int) bool {
39 return func(i, j int) bool {
40 return LessIgnoreCase(list[i], list[j])
41 }
42}

Callers 4

ExecuteMethod · 0.92
CommandInfoByNameMethod · 0.92
alphabetic_test.goFile · 0.85

Calls 1

LessIgnoreCaseFunction · 0.85

Tested by

no test coverage detected