jsonfile

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read[T any](path string) (T, error)

func ReadAndValidate

func ReadAndValidate[T any](path string, schema *gojsonschema.Schema) (T, error)

func Write

func Write(path string, val any) error

Types

type ErrValidation

type ErrValidation struct {
	Errors []gojsonschema.ResultError
}

func (*ErrValidation) Error

func (err *ErrValidation) Error() string

Jump to

Keyboard shortcuts

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