mirror of
https://github.com/spf13/viper
synced 2024-12-22 19:47:01 +00:00
clean a little: added watch and ReadBufConf
This commit is contained in:
parent
3492885e84
commit
4aa8f94511
1 changed files with 0 additions and 9 deletions
9
viper.go
9
viper.go
|
@ -36,8 +36,6 @@ import (
|
||||||
jww "github.com/spf13/jwalterweatherman"
|
jww "github.com/spf13/jwalterweatherman"
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
crypt "github.com/xordataexchange/crypt/config"
|
crypt "github.com/xordataexchange/crypt/config"
|
||||||
|
|
||||||
// log "github.com/oliveagle/seelog"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var v *Viper
|
var v *Viper
|
||||||
|
@ -270,8 +268,6 @@ func (v *Viper) AddRemoteProvider(provider, endpoint, path string) error {
|
||||||
v.remoteProviders = append(v.remoteProviders, rp)
|
v.remoteProviders = append(v.remoteProviders, rp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// log.Info("remoteProviders", v.remoteProviders)
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -810,9 +806,6 @@ func (v *Viper) getRemoteConfig(provider *remoteProvider) (map[string]interface{
|
||||||
|
|
||||||
// retrieve the first found remote configuration
|
// retrieve the first found remote configuration
|
||||||
func (v *Viper) watchKeyValueConfig() error {
|
func (v *Viper) watchKeyValueConfig() error {
|
||||||
// log.Info("ahahahah==========================================")
|
|
||||||
// log.Info("remoteProviders", v.remoteProviders)
|
|
||||||
|
|
||||||
for _, rp := range v.remoteProviders {
|
for _, rp := range v.remoteProviders {
|
||||||
val, err := v.watchRemoteConfig(rp)
|
val, err := v.watchRemoteConfig(rp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -825,8 +818,6 @@ func (v *Viper) watchKeyValueConfig() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *Viper) watchRemoteConfig(provider *remoteProvider) (map[string]interface{}, error) {
|
func (v *Viper) watchRemoteConfig(provider *remoteProvider) (map[string]interface{}, error) {
|
||||||
// defer log.Flush()
|
|
||||||
// log.Info("ahahahah==========================================")
|
|
||||||
var cm crypt.ConfigManager
|
var cm crypt.ConfigManager
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue