Documentation
¶
Overview ¶
Package encoding is an extension to the Go Standard Library's encoding (https://godoc.org/encoding) package. It defines interfaces and helper functions shared by other packages (specifically the sub-packages of this library).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNil ¶
func IsNil(v interface{}) bool
IsNil returns true if the given value `v` is equivalent to nil, either because it is an `IsNiler` and `v.IsNil()` returns `true`, or it is a channel, function variable, interface, map, pointer, or slice whose value is the associated `nil`.
func IsValueNil ¶
IsValueNil returns true if the given reflect.Value `v` is equivalent to nil, either because it is an `IsNiler` and `v.IsNil()` returns `true`, or it is a channel, function variable, interface, map, pointer, or slice whose value is the associated `nil`.
func IsValueZero ¶
Types ¶
type IsNiler ¶
type IsNiler interface {
IsNil() bool
}
IsNiler is an interface implemented by an object with a nil value that may differ from Go's default nil value. This is used in encoding/map with the "omitnil" struct tag to give fields a chance to specify when they should be omitted due to containing a nil value.
type IsZeroer ¶
type IsZeroer interface {
IsZero() bool
}
IsZeroer is an interface implemented by an object with a zero value that may differ from Go's default zero value. This is used in encoding/map with the "omitzero" struct tag to give fields a chance to specify when they should be omitted due to containing a zero value.
Directories
¶
Path | Synopsis |
---|---|
Package maps provides helper functions and struct tags that facilitate the conversion of structs to `map[string]interface{}`s, and vice-versa.
|
Package maps provides helper functions and struct tags that facilitate the conversion of structs to `map[string]interface{}`s, and vice-versa. |
Package types defines a number of helper types that bridge the packages database/sql, encoding, encoding/json, and encoding/maps.
|
Package types defines a number of helper types that bridge the packages database/sql, encoding, encoding/json, and encoding/maps. |
null
Package null defines a number of nullable types that bridge the packages database/sql, encoding, encoding/json, and encoding/maps.
|
Package null defines a number of nullable types that bridge the packages database/sql, encoding, encoding/json, and encoding/maps. |