Don't panic on an empty configuration during merge

This commit is contained in:
Jeff Mitchell
2016-07-05 16:49:15 -04:00
parent 50e44b750d
commit 6bdda578ac

View File

@@ -97,6 +97,10 @@ func (s *Telemetry) GoString() string {
// Merge merges two configurations.
func (c *Config) Merge(c2 *Config) *Config {
if c2 == nil {
return c
}
result := new(Config)
for _, l := range c.Listeners {
result.Listeners = append(result.Listeners, l)