Merge branch 'master' into master

This commit is contained in:
Adrian Maurer 2021-09-21 10:22:45 -04:00 committed by GitHub
commit e354c1be00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 15 deletions

View File

@ -379,11 +379,7 @@ type RemoteProvider interface {
} }
// SupportedExts are universally supported extensions. // SupportedExts are universally supported extensions.
<<<<<<< HEAD var SupportedExts = []string{"json", "cue", "toml", "yaml", "yml", "properties", "props", "prop", "hcl", "tfvars", "dotenv", "env", "ini"}
var SupportedExts = []string{"json", "cue", "toml", "yaml", "yml", "properties", "props", "prop", "hcl", "dotenv", "env", "ini"}
=======
var SupportedExts = []string{"json", "toml", "yaml", "yml", "properties", "props", "prop", "hcl", "tfvars", "dotenv", "env", "ini"}
>>>>>>> ce82267a111f9e5711bfbb03acf954188dcd38fb
// SupportedRemoteProviders are universally supported remote providers. // SupportedRemoteProviders are universally supported remote providers.
var SupportedRemoteProviders = []string{"etcd", "consul", "firestore"} var SupportedRemoteProviders = []string{"etcd", "consul", "firestore"}
@ -1639,11 +1635,8 @@ func (v *Viper) unmarshalReader(in io.Reader, c map[string]interface{}) error {
buf.ReadFrom(in) buf.ReadFrom(in)
switch format := strings.ToLower(v.getConfigType()); format { switch format := strings.ToLower(v.getConfigType()); format {
<<<<<<< HEAD
case "yaml", "yml", "json", "cue", "toml", "hcl": case "yaml", "yml", "json", "cue", "toml", "hcl", "tfvars":
=======
case "yaml", "yml", "json", "toml", "hcl", "tfvars":
>>>>>>> ce82267a111f9e5711bfbb03acf954188dcd38fb
err := decoderRegistry.Decode(format, buf.Bytes(), &c) err := decoderRegistry.Decode(format, buf.Bytes(), &c)
if err != nil { if err != nil {
return ConfigParseError{err} return ConfigParseError{err}
@ -1700,11 +1693,8 @@ func (v *Viper) unmarshalReader(in io.Reader, c map[string]interface{}) error {
func (v *Viper) marshalWriter(f afero.File, configType string) error { func (v *Viper) marshalWriter(f afero.File, configType string) error {
c := v.AllSettings() c := v.AllSettings()
switch configType { switch configType {
<<<<<<< HEAD
case "yaml", "yml", "json", "cue", "toml", "hcl": case "yaml", "yml", "json", "cue", "toml", "hcl", "tfvars":
=======
case "yaml", "yml", "json", "toml", "hcl", "tfvars":
>>>>>>> ce82267a111f9e5711bfbb03acf954188dcd38fb
b, err := encoderRegistry.Encode(configType, c) b, err := encoderRegistry.Encode(configType, c)
if err != nil { if err != nil {
return ConfigMarshalError{err} return ConfigMarshalError{err}