|
|
@ -489,16 +489,16 @@ func (c *Config) Override(o *Config, fn string) { |
|
|
|
|
|
|
|
|
|
|
|
// update the Inbound in slice if the only one in overide config has same tag
|
|
|
|
// update the Inbound in slice if the only one in overide config has same tag
|
|
|
|
if len(o.InboundConfigs) > 0 { |
|
|
|
if len(o.InboundConfigs) > 0 { |
|
|
|
if len(c.InboundConfigs) > 0 && len(o.InboundConfigs) == 1 { |
|
|
|
for i := range o.InboundConfigs { |
|
|
|
if idx := c.findInboundTag(o.InboundConfigs[0].Tag); idx > -1 { |
|
|
|
if idx := c.findInboundTag(o.InboundConfigs[i].Tag); idx > -1 { |
|
|
|
c.InboundConfigs[idx] = o.InboundConfigs[0] |
|
|
|
c.InboundConfigs[idx] = o.InboundConfigs[i] |
|
|
|
ctllog.Println("[", fn, "] updated inbound with tag: ", o.InboundConfigs[0].Tag) |
|
|
|
ctllog.Println("[", fn, "] updated inbound with tag: ", o.InboundConfigs[0].Tag) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
c.InboundConfigs = append(c.InboundConfigs, o.InboundConfigs[0]) |
|
|
|
c.InboundConfigs = append(c.InboundConfigs, o.InboundConfigs[i]) |
|
|
|
ctllog.Println("[", fn, "] appended inbound with tag: ", o.InboundConfigs[0].Tag) |
|
|
|
ctllog.Println("[", fn, "] appended inbound with tag: ", o.InboundConfigs[0].Tag) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
c.InboundConfigs = o.InboundConfigs |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|