Documentation ¶
Overview ¶
Package ptr provides functions to create on the fly pointer values for some built-in types. This might seem stupid but in our codebase we have a lot of places in which we just need to create variable just to get the pointer to it. That clutters the code a lot and causes distraction. Most of the time those strings are just throw-away constants and the pointer "is not really important later".
Index ¶
- func Bool(o bool) *bool
- func Float32(o float32) *float32
- func Float64(o float64) *float64
- func Int(o int) *int
- func Int16(o int16) *int16
- func Int32(o int32) *int32
- func Int64(o int64) *int64
- func Int8(o int8) *int8
- func Interface(o interface{}) *interface{}
- func String(o string) *string
- func Time(o time.Time) *time.Time
- func UUID(o uuid.UUID) *uuid.UUID
- func Uint(o uint) *uint
- func Uint16(o uint16) *uint16
- func Uint32(o uint32) *uint32
- func Uint64(o uint64) *uint64
- func Uint8(o uint8) *uint8
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.