config

package
v0.0.0-...-860e413 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JSONReader = json.Unmarshal
	TOMLReader = toml.Unmarshal
	YAMLReader = func(data []byte, o interface{}) error { return yaml.Unmarshal(data, o) }
)

Functions

func Read

func Read(obj interface{}, configFiles ...string) error

Read deserializes each config file to the target obj using a Reader (depending on file extension) env vars are replaced in the config file as well as the file path

Types

type ReaderFunc

type ReaderFunc func(data []byte, o interface{}) error

type ValidatableConfiguration

type ValidatableConfiguration interface {
	Validate() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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