NewConfig return value error

This commit is contained in:
Allenxuxu 2020-01-19 16:42:05 +08:00
parent a82fd19209
commit ee7304a795

View File

@ -44,8 +44,14 @@ func newConfig(opts ...Option) (Config, error) {
return nil, err return nil, err
} }
snap, _ := options.Loader.Snapshot() snap, err := options.Loader.Snapshot()
vals, _ := options.Reader.Values(snap.ChangeSet) if err != nil {
return nil, err
}
vals, err := options.Reader.Values(snap.ChangeSet)
if err != nil {
return nil, err
}
c := &config{ c := &config{
exit: make(chan bool), exit: make(chan bool),