Make LabelFromKey return an empty string for unset keys

It previously returned "\x00", which is probably not intended, but happened to
work.
This commit is contained in:
Stefan Haller
2025-07-27 12:25:16 +02:00
parent 7fe96e9aee
commit 96a6e659a6
+4
View File
@@ -17,6 +17,10 @@ func Label(name string) string {
}
func LabelFromKey(key types.Key) string {
if key == nil {
return ""
}
keyInt := 0
switch key := key.(type) {