patch

package
v0.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field added in v0.12.0

type Field[T any] struct {
	Value T
	Valid bool
}

Field is a wrapper which can tell if a field was unmarshalled from the data provided. When `Field.Valid` is true, which means `Field.Value` is populated from decoding the raw data. Otherwise, no data was provided, i.e. field missing.

func (Field[T]) MarshalJSON added in v0.12.0

func (f Field[T]) MarshalJSON() ([]byte, error)

func (*Field[T]) UnmarshalJSON added in v0.12.0

func (f *Field[T]) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL