jsonhelper

package
v0.0.0-...-5a5e713 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 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

func OpenAndDecodeDisallowUnknownFields(path string, v any) error

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

Types

type Duration

type Duration time.Duration

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

func (Duration) MarshalText

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

MarshalText implements encoding.TextMarshaler.MarshalText.

func (*Duration) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.UnmarshalText.

func (Duration) Value

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