config

package
v0.0.0-...-41c389d Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(path string, v interface{}) (err error)

LoadConfig load config

func LocalPath

func LocalPath(in string) (out string)

LocalPath local path

func WatchConfig

func WatchConfig(path string, v interface{}, watch bool) (err error)

WatchConfig watch config

func WatchConfigs

func WatchConfigs(confs map[string]interface{}, watch bool) (err error)

WatchConfigs watch config

Types

type Viper

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

Viper config struct

func (*Viper) OnConfigChange

func (v *Viper) OnConfigChange(run func(in fsnotify.Event))

OnConfigChange config change listener

func (*Viper) WatchConfig

func (v *Viper) WatchConfig()

WatchConfig viper watch config

Jump to

Keyboard shortcuts

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