defaults

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFromJSON

func ReadFromJSON(path, fallbackPath string, value interface{}) error

ReadFromJSON reads a json file to the value. This function will try to read from given path, if it is empty will try fallback path. If it fails on fallback, it will set value to it's defaults

func Set

func Set(value interface{}) error

Set sets the default values to fields

func Validate

func Validate(value interface{}) error

Validate validates each field of the value

Types

This section is empty.

Jump to

Keyboard shortcuts

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