status-go/services/wallet/common/ptrutils.go

8 lines
87 B
Go

package common
func NewAndSet[T any](v T) *T {
res := new(T)
*res = v
return res
}