1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-24 10:07:04 +02:00

loader: avoid overwriting values if error happens (#2204)

This commit is contained in:
Qiu Yu 2021-08-11 05:33:58 -07:00 committed by GitHub
parent a46dc0b856
commit 828d3f2b74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,7 +140,9 @@ func (m *memory) reload() error {
}
// set values
m.vals, _ = m.opts.Reader.Values(set)
if vals, err := m.opts.Reader.Values(set); err != nil {
m.vals = vals
}
m.snap = &loader.Snapshot{
ChangeSet: set,
Version: genVer(),