Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Variant ¶
type Variant[X, Y any] struct { X X Y Y }
A Variant decodes one JSON value into X or into Y. When both decode, X wins, so Y can be a type that takes any value: a secret comes back as a hash object in X, and a plain value in Y.
func (Variant[X, Y]) MarshalJSON ¶
func (*Variant[X, Y]) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.