Documentation
¶
Overview ¶
Package paws provides some helper functions for gopher's developing experience.
Index ¶
- func Bool(b bool) *bool
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int8(i int8) *int8
- func Int16(i int16) *int16
- func Int32(i int32) *int32
- func Int64(i int64) *int64
- func MustBool(p *bool, b bool) bool
- func MustFloat32(p *float32, f float32) float32
- func MustFloat64(p *float64, f float64) float64
- func MustInt(p *int, i int) int
- func MustInt8(p *int8, i int8) int8
- func MustInt16(p *int16, i int16) int16
- func MustInt32(p *int32, i int32) int32
- func MustInt64(p *int64, i int64) int64
- func MustString(p *string, s string) string
- func MustTime(p *time.Time, t time.Time) time.Time
- func MustUint(p *uint, u uint) uint
- func MustUint8(p *uint8, u uint8) uint8
- func MustUint16(p *uint16, u uint16) uint16
- func MustUint32(p *uint32, u uint32) uint32
- func MustUint64(p *uint64, u uint64) uint64
- func String(s string) *string
- func Time(t time.Time) *time.Time
- func Uint(u uint) *uint
- func Uint8(u uint8) *uint8
- func Uint16(u uint16) *uint16
- func Uint32(u uint32) *uint32
- func Uint64(u uint64) *uint64
- func Z2NBool(b bool) *bool
- func Z2NFloat32(f float32) *float32
- func Z2NFloat64(f float64) *float64
- func Z2NInt(i int) *int
- func Z2NInt8(i int8) *int8
- func Z2NInt16(i int16) *int16
- func Z2NInt32(i int32) *int32
- func Z2NInt64(i int64) *int64
- func Z2NString(s string) *string
- func Z2NTime(t time.Time) *time.Time
- func Z2NUint(u uint) *uint
- func Z2NUint8(u uint8) *uint8
- func Z2NUint16(u uint16) *uint16
- func Z2NUint32(u uint32) *uint32
- func Z2NUint64(u uint64) *uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustBool ¶
MustBool returns a bool value of pointer p, if p is not nil. b is returned, if p is nil.
func MustFloat32 ¶
MustFloat32 returns a float32 value of pointer p, if p is not nil. f is returned, if p is nil.
func MustFloat64 ¶
MustFloat64 returns a float64 value of pointer p, if p is not nil. f is returned, if p is nil.
func MustInt ¶
MustInt returns a int value of pointer p, if p is not nil. i is returned, if p is nil.
func MustInt8 ¶
MustInt8 returns int value of pointer p, if p is not nil. i is returned, if p is nil.
func MustInt16 ¶
MustInt16 returns a int value of pointer p, if p is not nil. i is returned, if p is nil.
func MustInt32 ¶
MustInt32 returns a int value of pointer p, if p is not nil. i is returned, if p is nil.
func MustInt64 ¶
MustInt64 returns a int value of pointer p, if p is not nil. i is returned, if p is nil.
func MustString ¶
MustString returns a string value of pointer p, if p is not nil. s is returned, if p is nil.
func MustTime ¶ added in v1.1.0
MustTime returns a time.Time value of pointer p, if p is not nil. t is returned, if p is nil.
func MustUint ¶
MustUint returns a uint64 value of pointer p, if p is not nil. u is returned, if p is nil.
func MustUint8 ¶
MustUint8 returns a uint8 value of pointer p, if p is not nil. u is returned, if p is nil.
func MustUint16 ¶
MustUint16 returns a uint16 value of pointer p, if p is not nil. u is returned, if p is nil.
func MustUint32 ¶
MustUint32 returns a uint32 value of pointer p, if p is not nil. u is returned, if p is nil.
func MustUint64 ¶
MustUint64 returns a uint64 value of pointer p, if p is not nil. u is returned, if p is nil.
func Z2NBool ¶ added in v1.2.0
Z2NBool returns a new pointer of given b bool. If b is zero value, it returns nil.
func Z2NFloat32 ¶ added in v1.2.0
Z2NFloat32 returns a new pointer of given f float32. If f is zero value, it returns nil.
func Z2NFloat64 ¶ added in v1.2.0
Z2NFloat64 returns a new pointer of given f float64. If f is zero value, it returns nil.
func Z2NInt ¶ added in v1.2.0
Z2NInt returns a new pointer of given i int. If i is zero value, it returns nil.
func Z2NInt8 ¶ added in v1.2.0
Z2NInt8 returns a new pointer of given i int8. If i is zero value, it returns nil.
func Z2NInt16 ¶ added in v1.2.0
Z2NInt16 returns a new pointer of given i int16. If i is zero value, it returns nil.
func Z2NInt32 ¶ added in v1.2.0
Z2NInt32 returns a new pointer of given i int32. If i is zero value, it returns nil.
func Z2NInt64 ¶ added in v1.2.0
Z2NInt64 returns a new pointer of given i int64. If u is zero value, it returns nil.
func Z2NString ¶ added in v1.2.0
Z2NString returns a new pointer of given s string. If s is zero value, it returns nil.
func Z2NTime ¶ added in v1.2.0
Z2NTime returns a new pointer of given t time.Time. If t is zero value, it returns nil.
func Z2NUint ¶ added in v1.2.0
Z2NUint returns a new pointer of given u uint. If u is zero value, it returns nil.
func Z2NUint8 ¶ added in v1.2.0
Z2NUint8 returns a new pointer of given u uint8. If u is zero value, it returns nil.
func Z2NUint16 ¶ added in v1.2.0
Z2NUint16 returns a new pointer of given u uint16. If u is zero value, it returns nil.
Types ¶
This section is empty.