viper

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: MPL-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvPrefixedName

func EnvPrefixedName(prefix, key string) string

EnvPrefixedName replicates the private viper.mergeWithEnvPrefix.

func IsSetInCommand

func IsSetInCommand(v *std_viper.Viper, c *cobra.Command, prefix, key string) bool

IsSetInCommand provides a viper.IsSet alternative that works around a bug which causes IsSet to always return true if the config key is bound to cobra: https://github.com/spf13/viper/issues/276.

The workaround logic doesn't support the case where a flag both has a default value and was also erroneously marked as required.

func NewEnvSpace

func NewEnvSpace(prefix string) *std_viper.Viper

NewEnvSpace returns an initialized Viper instance configured to read all keys from an environment variable prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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