We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0798687 commit a2e8358Copy full SHA for a2e8358
1 file changed
core/metrics/accumulator.go
@@ -6,7 +6,6 @@ import (
6
"time"
7
8
"github.com/benbjohnson/clock"
9
- "github.com/samber/lo"
10
)
11
12
type Accumulator struct {
@@ -65,7 +64,7 @@ func (m *Accumulator) Exported() float64 {
65
64
func (m *Accumulator) SetImportMeterTotal(v float64) {
66
defer func() {
67
m.updated = m.clock.Now()
68
- m.importMeter = lo.ToPtr(v)
+ m.importMeter = new(v)
69
}()
70
71
if m.importMeter == nil {
@@ -81,7 +80,7 @@ func (m *Accumulator) SetImportMeterTotal(v float64) {
81
80
func (m *Accumulator) SetExportMeterTotal(v float64) {
82
83
84
- m.exportMeter = lo.ToPtr(v)
+ m.exportMeter = new(v)
85
86
87
if m.exportMeter == nil {
0 commit comments