// Package configtest gives the tests of the packages that read settings the // settings they choose. package configtest import "github.com/spf13/viper" // Viper returns a viper holding each of settings, as the viper config.NewViper // returns holds a process's environment. func Viper(settings map[string]string) *viper.Viper { v := viper.New() for name, value := range settings { v.Set(name, value) } return v }