config

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load[T any](dst *T, cb func(), ldrs ...Loader) error

func MustLoad

func MustLoad[T any](dst *T, cb func(), ldrs ...Loader)

Types

type EnvLoader

type EnvLoader struct{}

func (EnvLoader) Load

func (e EnvLoader) Load(dst any) error

type JSONLoader

type JSONLoader struct {
	Source io.ReadCloser
	// contains filtered or unexported fields
}

func NewJSONLoaderFromFile

func NewJSONLoaderFromFile(path string) (*JSONLoader, error)

func (*JSONLoader) Load

func (l *JSONLoader) Load(dst any) error

type Loader

type Loader interface {
	Load(dst any) error
}

Jump to

Keyboard shortcuts

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