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

8 lines
87 B
Go
Raw Permalink Normal View History

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