Documentation
¶
Index ¶
- func AddrIfPresent[T comparable](v param.Opt[T]) *T
- func IsNullPtr[T any](ptr *T) bool
- func IsNullSlice[T any](slice []T) bool
- func NullPtr[T any]() *T
- func NullSlice[T any]() []T
- func ToOpt[T comparable](v T, meta respjson.Field) param.Opt[T]
- func Valid(v param.ParamStruct) bool
- func VariantFromUnion(u reflect.Value) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddrIfPresent ¶
func AddrIfPresent[T comparable](v param.Opt[T]) *T
func IsNullSlice ¶
IsNullSlice returns true if the slice was created by NullSlice.
func NullPtr ¶
func NullPtr[T any]() *T
NullPtr returns a pointer to the zero value of the type T. When used with [MarshalObject] or [MarshalUnion], it will be marshaled as null.
It is unspecified behavior to mutate the value pointed to by the returned pointer.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.