Documentation ¶
Overview ¶
Package opt defines optional types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bool ¶
type Bool string
Bool represents an optional boolean to be JSON-encoded. The string is either "true", "false", or the enmpty string to mean unset.
As a special case, the underlying string may also be the string "unset" as as a synonym for the empty string. This lets the explicit unset value be exchanged over an encoding/json "omitempty" field without it being dropped.
func (Bool) EqualBool ¶ added in v0.100.0
EqualBool reports whether b is equal to v. If b is empty or not a valid bool, it reports false.
func (Bool) MarshalJSON ¶
func (*Bool) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.