From 49f6df7219cec005a55cd0a57599571d6cb8bda6 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Fri, 22 Dec 2023 15:54:57 +0100 Subject: [PATCH] gauge: fix `unaligned 64-bit atomic operation` panic on 32-bit architectures --- gauge.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gauge.go b/gauge.go index 9f676f4..9bbbce2 100644 --- a/gauge.go +++ b/gauge.go @@ -28,11 +28,11 @@ func NewGauge(name string, f func() float64) *Gauge { // Gauge is a float64 gauge. type Gauge struct { - // f is a callback, which is called for returning the gauge value. - f func() float64 - // valueBits contains uint64 representation of float64 passed to Gauge.Set. valueBits uint64 + + // f is a callback, which is called for returning the gauge value. + f func() float64 } // Get returns the current value for g.