From dc6b15a3726fb945608dd2938c0cf9d71446b7db Mon Sep 17 00:00:00 2001 From: Mark Beamer Jr Date: Sun, 5 Jan 2020 03:31:47 -0500 Subject: [PATCH] add floats --- extras/util/pointer.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/extras/util/pointer.go b/extras/util/pointer.go index 00b7f00..8d1bfb4 100644 --- a/extras/util/pointer.go +++ b/extras/util/pointer.go @@ -31,9 +31,11 @@ func PtrToUint64(u uint64) *uint64 { return &u } func PtrToUint8(u uint8) *uint8 { return &u } func PtrToUintptr(u uintptr) *uintptr { return &u } -func PtrToNullString(s string) *null.String { n := null.StringFrom(s); return &n } -func PtrToNullUint64(u uint64) *null.Uint64 { n := null.Uint64From(u); return &n } -func PtrToNullTime(t time.Time) *null.Time { n := null.TimeFrom(t); return &n } +func PtrToNullString(s string) *null.String { n := null.StringFrom(s); return &n } +func PtrToNullUint64(u uint64) *null.Uint64 { n := null.Uint64From(u); return &n } +func PtrToNullTime(t time.Time) *null.Time { n := null.TimeFrom(t); return &n } +func PtrToNullFloat64(f float64) *null.Float64 { n := null.Float64From(f); return &n } +func PtrToNullFloat32(f float32) *null.Float32 { n := null.Float32From(f); return &n } func StrFromPtr(ptr *string) string { if ptr == nil {