mirror of
https://github.com/spf13/viper
synced 2025-05-05 19:57:18 +00:00
Merge 5ada790898
into ea35b92596
This commit is contained in:
commit
653278b513
1 changed files with 6 additions and 0 deletions
6
viper.go
6
viper.go
|
@ -2000,6 +2000,12 @@ func (v *Viper) getRemoteConfig(provider RemoteProvider) (map[string]any, error)
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
providerType := strings.Split(provider.Path(), ".")[len(strings.Split(provider.Path(), "."))-1]
|
||||
if v.getConfigType() == "" && stringInSlice(providerType, SupportedExts) {
|
||||
SetConfigType(providerType)
|
||||
}
|
||||
|
||||
err = v.unmarshalReader(reader, v.kvstore)
|
||||
return v.kvstore, err
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue