Documentation ¶
Index ¶
- func Bool(b bool) *bool
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int64(i int64) *int64
- func MustNewBigIntFromString(s string) *big.Int
- func MustNewDecimalFromString(s string) *decimal.Big
- func MustNewTimeFromString(str string) *time.Time
- func MustTimeFromString(str string) time.Time
- func Pointer[T any](v T) *T
- func String(s string) *string
- type Date
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustNewBigIntFromString ¶ added in v1.8.0
MustNewBigIntFromString returns an instance of big.Int from a string The string is assumed to be base 10 and if it is not a valid big.Int then the function panics. Avoid using this function in production code.
func MustNewDecimalFromString ¶ added in v1.8.0
MustNewDecimalFromString returns an instance of Decimal from a string Avoid using this function in production code.
func MustNewTimeFromString ¶
MustNewTimeFromString returns an instance of time.Time from a string formatted as "2006-01-02T15:04:05Z07:00" or panics. Avoid using this function in production code.
func MustTimeFromString ¶
MustTimeFromString returns a time.Time from a string formatted as "2006-01-02T15:04:05Z07:00" or panics. Avoid using this function in production code.
Types ¶
type Date ¶
Date is a wrapper around time.Time that allows for JSON marshaling a date string formatted as "2006-01-02".
func DateFromString ¶
DateFromString returns a Date from a string formatted as "2006-01-02".
func DateFromTime ¶
DateFromTime returns a Date from a time.Time.
func MustDateFromString ¶
MustDateFromString returns a Date from a string formatted as "2006-01-02" or panics. Avoid using this function in production code.
func MustNewDateFromString ¶
MustNewDateFromString returns an instance of Date from a string formatted as "2006-01-02" or panics. Avoid using this function in production code.
func NewDateFromString ¶
NewDateFromString returns an instance of Date from a string formatted as "2006-01-02".