refactor: use maps.Copy from stdlib

This commit is contained in:
2026-05-25 01:15:45 +02:00
parent f13f7b7fc6
commit 931398fa67

View File

@@ -2,6 +2,7 @@ package observability
import (
"fmt"
"maps"
"net/http"
"sort"
"strconv"
@@ -220,9 +221,7 @@ func buildLabelKey(labelNames []string, labelValues []string) (string, map[strin
func copyLabels(labels map[string]string) map[string]string {
out := make(map[string]string, len(labels))
for key, value := range labels {
out[key] = value
}
maps.Copy(out, labels)
return out
}