This commit is contained in:
lijing 2024-05-12 00:23:49 +02:00 committed by GitHub
commit 653278b513
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
}