Skip to content

Commit 941defb

Browse files
committed
fix panic creating value for interface
1 parent 4ba7733 commit 941defb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

utils/configutil/atomic.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ type AtomicValue[T any] struct {
7474
}
7575

7676
func newAtomicValue[T any](v T) *AtomicValue[T] {
77-
a := &AtomicValue[T]{}
78-
a.Store(v)
79-
return a
77+
return &AtomicValue[T]{}
8078
}
8179

8280
func (a *AtomicValue[T]) Store(v T) {

0 commit comments

Comments
 (0)