Documentation ¶
Overview ¶
Package viper is a library for manipulating vipers (https://github.com/spf13/viper).
This version of the package is compatible with Viper v1.4.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFileViper ¶
NewFileViper () is a simple interface for creating file-based vipers.
The first parametre of this function should be the path of the file. Relative and absolute paths are supported.
This second parametre should be a file format supported by viper (github.com/spf13/viper). To put in simpler terms, this value must be a valid parametre for method someViper.SetConfigType (), as this parametre would be passed to the method.
Method someViper.ReadInConfig () is not called by this function, so you would have to do it yourself.
v1, err1 := viper.NewFileViper ("../someDir/file.ext", "json") v2, err2 := viper.NewFileViper ("/etc/file", "yaml") v3, err3 := viper.NewFileViper ("file.ext", "yaml")
Types ¶
This section is empty.