Documentation
¶
Index ¶
- Constants
- func GetChildElem(v reflect.Value) (res reflect.Value)
- func GetInitElem(v reflect.Value) (res reflect.Value)
- func IsArrayZero(v reflect.Value) bool
- func IsInterfaceReflectZero(val interface{}) (result bool)
- func IsReflectZero(val reflect.Value) (result bool)
- func IsStructZero(v reflect.Value) bool
- func IsTimeZero(t time.Time) bool
- func IsValueZero(v reflect.Value) bool
- func IsZero(k interface{}) bool
- type Zeroable
Constants ¶
const ( ZeroTime0 = "0000-00-00 00:00:00" ZeroTime1 = "0001-01-01 00:00:00" )
List of constants for the zero time.
Variables ¶
This section is empty.
Functions ¶
func GetChildElem ¶
GetChildElem gets the child elem if it is a pointer with an element of pointer.
func GetInitElem ¶
GetInitElem gets the element of a pointer value. It initialize the element of a pointer value if it is nil.
func IsInterfaceReflectZero ¶ added in v1.0.1
func IsInterfaceReflectZero(val interface{}) (result bool)
IsInterfaceReflectZero checks whether the interface is nil. It also checks if the reflect.Value of val is reflect.Zero of it's type.
func IsReflectZero ¶ added in v1.0.1
IsReflectZero check if the val of reflect.Value is a reflect.Zero of it's type. This operation is solely based on reflect.Zero, not to check if the actual underlying value is zero. To check if the value of reflect.Value is zero, use IsZero or IsValueZero.
func IsStructZero ¶
IsStructZero checks if the struct is zero.
func IsValueZero ¶
IsValueZero check the reflect.Value if it is zero based on it's kind.