viper

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeConfig

func MergeConfig(fs *pflag.FlagSet, v *std_viper.Viper) (lastErr error)

MergeConfig supplements the one-way binding provided by viper.BindPFlag(s) which only allows reading the bound config values via viper, e.g. GetString, but not through variables bound to configs by cobra, e.g. via StringVarP(). This allows reading of the bound values from the latter.

Origin (except for "stringSlice" case):

https://github.com/spf13/viper/issues/35#issuecomment-71908327
https://github.com/xh3b4sd

Changes:

- Add stringSlice support from https://github.com/spf13/viper.

Types

This section is empty.

Jump to

Keyboard shortcuts

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