mirror of
https://github.com/go-micro/go-micro.git
synced 2024-11-24 08:02:32 +02:00
fix(config/source/cli): mergo.Map error, src and dst must be of same … (#2628)
This commit is contained in:
parent
ad8fca255b
commit
1478a8e46d
@ -25,7 +25,9 @@ func (c *cliSource) Read() (*source.ChangeSet, error) {
|
||||
for _, f := range c.ctx.App.Flags {
|
||||
name := f.Names()[0]
|
||||
tmp := toEntry(name, c.ctx.Generic(name))
|
||||
mergo.Map(&changes, tmp) // need to sort error handling
|
||||
if err := mergo.Map(&changes, tmp, mergo.WithOverride); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
b, err := c.opts.Encoder.Encode(changes)
|
||||
|
Loading…
Reference in New Issue
Block a user