Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllPtrFieldsNil ¶
func AllPtrFieldsNil(obj interface{}) bool
AllPtrFieldsNil tests whether all pointer fields in a struct are nil. This is useful when, for example, an API struct is handled by plugins which need to distinguish "no plugin accepted this spec" from "this spec is empty".
This function is only valid for structs and pointers to structs. Any other type will cause a panic. Passing a typed nil pointer will return true.
func Int32PtrDerefOr ¶
Int32PtrDerefOr dereference the int32 ptr and returns it i not nil, else returns def.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.