Documentation
¶
Overview ¶
Package ptr provides a set of SQL compatible pointer helpers
Index ¶
- Variables
- func Bool(s interface{}) *bool
- func Duration(t interface{}) *time.Duration
- func First(ptrs ...interface{}) interface{}
- func Int(i interface{}) *int
- func Int64(i interface{}) *int64
- func NilString(s interface{}) *string
- func String(s interface{}) *string
- func Time(t interface{}) *time.Time
- func Uint64(u interface{}) *uint64
- type JSON
- type Pointers
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // False is the false pointer False = Bool(false) // True is the true pointer True = Bool(true) )
Functions ¶
func First ¶ added in v0.1.1
func First(ptrs ...interface{}) interface{}
First returns the first non-nil ptr
Types ¶
type JSON ¶
type JSON struct { json.RawMessage // contains filtered or unexported fields }
JSON is json pointer
func (JSON) MarshalJSON ¶
MarshalJSON marshals the object to json
Click to show internal directories.
Click to hide internal directories.