From 698a313c5785ddf5987af02b84296d9bbc43bcc9 Mon Sep 17 00:00:00 2001 From: Shivanth Date: Sun, 3 Nov 2024 20:52:18 +0100 Subject: [PATCH] Rename SyncMaptoMap -> SyncMapToMap Signed-off-by: Shivanth --- prometheus/histogram_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prometheus/histogram_test.go b/prometheus/histogram_test.go index 8a86ac634..665111ec7 100644 --- a/prometheus/histogram_test.go +++ b/prometheus/histogram_test.go @@ -1456,7 +1456,7 @@ func compareNativeExemplarValues(t *testing.T, exps []*dto.Exemplar, values []fl } } -func syncMaptoMap(syncmap *sync.Map) (m map[int]int64) { +func syncMapToMap(syncmap *sync.Map) (m map[int]int64) { m = map[int]int64{} syncmap.Range(func(key, value any) bool { m[key.(int)] = *value.(*int64) @@ -1974,8 +1974,8 @@ func TestConstNativeHistogram(t *testing.T) { consthist, err := NewConstNativeHistogram(_his.Desc(), cold.count, math.Float64frombits(cold.sumBits), - syncMaptoMap(&cold.nativeHistogramBucketsPositive), - syncMaptoMap(&cold.nativeHistogramBucketsNegative), + syncMapToMap(&cold.nativeHistogramBucketsPositive), + syncMapToMap(&cold.nativeHistogramBucketsNegative), cold.nativeHistogramZeroBucket, cold.nativeHistogramSchema, math.Float64frombits(cold.nativeHistogramZeroThresholdBits),