gentoo/net-analyzer/termshark/files/2.4.0-use-sort.Strings.patch
Holger Hoffstätte 4ce4f6c95f
net-analyzer/termshark: fix tests with wireshark-4.6.0
Also add a small simplification/peformance fix.

Closes: https://bugs.gentoo.org/964258
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Part-of: https://github.com/gentoo/gentoo/pull/44556
Closes: https://github.com/gentoo/gentoo/pull/44556
Signed-off-by: Sam James <sam@gentoo.org>
2025-11-12 09:40:35 +00:00

19 lines
586 B
Diff

https://github.com/gcla/termshark/pull/155
From: guoguangwu <guoguangwu@magic-shield.com>
Date: Wed, 5 Jul 2023 21:31:15 +0800
Subject: [PATCH] chore: use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...))
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
--- a/utils.go
+++ b/utils.go
@@ -693,7 +693,7 @@ func KeyValueErrorString(err gowid.KeyValueError) string {
for k := range err.KeyVals {
ks = append(ks, k)
}
- sort.Sort(sort.StringSlice(ks))
+ sort.Strings(ks)
for _, k := range ks {
kvs = append(kvs, fmt.Sprintf("%v: %v", k, err.KeyVals[k]))
}