mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-27 22:19:05 +01:00
fix: tighten reflect usage in pdh and textfile (#2517)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
453506f3b8
commit
7ee3b0fb9b
@@ -18,7 +18,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"maps"
|
||||
"testing"
|
||||
|
||||
"go.yaml.in/yaml/v3"
|
||||
@@ -49,7 +49,7 @@ func TestConfigFlattening(t *testing.T) {
|
||||
}
|
||||
flattenedValues := flatten(data)
|
||||
|
||||
if !reflect.DeepEqual(expectedResult, flattenedValues) {
|
||||
if !maps.Equal(expectedResult, flattenedValues) {
|
||||
t.Errorf("Flattened values do not match!\nExpected result: %s\nActual result: %s", expectedResult, flattenedValues)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user