- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for labelSorter (0.1 sec)
-
src/runtime/pprof/label_test.go
ForLabels(ctx, func(key, value string) bool { ls = append(ls, label{key, value}) return true }) sort.Sort(labelSorter(ls)) return ls } type labelSorter []label func (s labelSorter) Len() int { return len(s) } func (s labelSorter) Swap(i, j int) { s[i], s[j] = s[j], s[i] } func (s labelSorter) Less(i, j int) bool { return s[i].key < s[j].key } func TestContextLabels(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 23:34:11 UTC 2023 - 3.4K bytes - Viewed (0)