jsonhelper

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenAndDecodeDisallowUnknownFields added in v1.11.0

func OpenAndDecodeDisallowUnknownFields(path string, v any) error

OpenAndDecodeDisallowUnknownFields opens the file at path and decodes it into v, disallowing unknown fields.

Types

type Duration added in v1.8.0

type Duration time.Duration

Duration is time.Duration but implements encoding.TextMarshaler and encoding.TextUnmarshaler.

func (Duration) MarshalText added in v1.8.0

func (d Duration) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.MarshalText.

func (*Duration) UnmarshalText added in v1.8.0

func (d *Duration) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler.UnmarshalText.

func (Duration) Value added in v1.11.0

func (d Duration) Value() time.Duration

Value returns the duration as time.Duration.

Jump to

Keyboard shortcuts

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