remove SortObjects

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2023-07-10 02:07:49 +02:00
parent 81745eeedf
commit ad1ab35399

View File

@@ -115,7 +115,6 @@ import (
"encoding/binary" "encoding/binary"
"fmt" "fmt"
"io" "io"
"sort"
"strings" "strings"
"syscall" "syscall"
"unsafe" "unsafe"
@@ -450,12 +449,3 @@ func convertCounterValue(counterDef *perfCounterDefinition, buffer []byte, value
return return
} }
// Sort slice of objects by index. This is useful for displaying
// a human-readable list or dump, but unnecessary otherwise.
func SortObjects(p []*PerfObject) {
sort.Slice(p, func(i, j int) bool {
return p[i].NameIndex < p[j].NameIndex
})
}