From ad1ab3539969603e469fc9cdec52ed810b3beadc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Mon, 10 Jul 2023 02:07:49 +0200 Subject: [PATCH] remove SortObjects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Otto Kröpke --- wmi/perflib/perflib.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/wmi/perflib/perflib.go b/wmi/perflib/perflib.go index f9d27543..74da4a72 100644 --- a/wmi/perflib/perflib.go +++ b/wmi/perflib/perflib.go @@ -115,7 +115,6 @@ import ( "encoding/binary" "fmt" "io" - "sort" "strings" "syscall" "unsafe" @@ -450,12 +449,3 @@ func convertCounterValue(counterDef *perfCounterDefinition, buffer []byte, value 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 - }) - -}