discord-community/helpers.go

16 lines
448 B
Go
Raw Normal View History

package main
import "time"
var (
2021-08-01 00:13:05 +00:00
ptrBoolFalse = ptrBool(false)
ptrInt64Zero = ptrInt64(0)
ptrStringEmpty = ptrString("")
)
2021-08-01 00:13:05 +00:00
func ptrBool(v bool) *bool { return &v }
func ptrDuration(v time.Duration) *time.Duration { return &v }
func ptrInt64(v int64) *int64 { return &v }
func ptrString(v string) *string { return &v }
func ptrTime(v time.Time) *time.Time { return &v }