conf

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(key string) val.Value

func Load

func Load(files ...string) error

Load from files and env, env > files[n-1] > ... > files[0]

Types

type Config

type Config struct {
	*Option
	// contains filtered or unexported fields
}

func New

func New(opts ...OptionFunc) *Config

func (*Config) Get added in v0.0.3

func (conf *Config) Get(key string) val.Value

func (*Config) Load added in v0.0.3

func (conf *Config) Load(paths ...string) error

type Option added in v0.0.3

type Option struct {
	// contains filtered or unexported fields
}

type OptionFunc added in v0.0.3

type OptionFunc = func(config *Option)

func WithDebug

func WithDebug(t bool) OptionFunc

func WithOverwrite

func WithOverwrite(t bool) OptionFunc

func WithSkipError

func WithSkipError(t bool) OptionFunc

Jump to

Keyboard shortcuts

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