config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Driver *viper.Viper
	// contains filtered or unexported fields
}

func New

func New(opts ...viper.Option) *Config

func (*Config) Load

func (c *Config) Load(path string) (*viper.Viper, error)

Load path if empty, get the default from the command line argument: --config

func (*Config) SetDefault

func (c *Config) SetDefault(key string, value interface{})

func (*Config) SetWatch

func (c *Config) SetWatch(b bool)

func (*Config) Unmarshal

func (c *Config) Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error

Jump to

Keyboard shortcuts

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