func (c *ConsulConfig) Merge(o *ConsulConfig) *ConsulConfig {
	if c == nil {
		if o == nil {
			return nil
		}
		return o.Copy()
	}

	if o == nil {
		return c.Copy()
	}

	r := c.Copy()

	if o.Address != nil {
		r.Address = o.Address
	}

	if o.Auth != nil {
		r.Auth = r.Auth.Merge(o.Auth)
	}

	if o.Retry != nil {
		r.Retry = r.Retry.Merge(o.Retry)
	}

	if o.SSL != nil {
		r.SSL = r.SSL.Merge(o.SSL)
	}

	if o.Token != nil {
		r.Token = o.Token
	}

	if o.Transport != nil {
		r.Transport = r.Transport.Merge(o.Transport)
	}

	return r
}
func (c *ConsulConfig) Merge(o *ConsulConfig) *ConsulConfig {
	if c == nil {
		if o == nil {
			return nil
		}
		return o.Copy()
	}

	if o == nil {
		return c.Copy()
	}

	r := c.Copy()

	if o.Address != nil {
		r.Address = o.Address
	}

	if o.Auth != nil {
		r.Auth = r.Auth.Merge(o.Auth)
	}

	if o.Retry != nil {
		r.Retry = r.Retry.Merge(o.Retry)
	}

	if o.SSL != nil {
		r.SSL = r.SSL.Merge(o.SSL)
	}

	if o.Token != nil {
		r.Token = o.Token
	}

	if o.Transport != nil {
		r.Transport = r.Transport.Merge(o.Transport)
	}

	return r
}
func ( c * ConsulConfig ) Merge ( o * ConsulConfig ) * ConsulConfig { if c == nil { if o == nil { return nil } return o . Copy ( ) } if o == nil { return c . Copy ( ) } r := c . Copy ( ) if o . Address != nil { r . Address = o . Address } if o . Auth != nil { r . Auth = r . Auth . Merge ( o . Auth ) } if o . Retry != nil { r . Retry = r . Retry . Merge ( o . Retry ) } if o . SSL != nil { r . SSL = r . SSL . Merge ( o . SSL ) } if o . Token != nil { r . Token = o . Token } if o . Transport != nil { r . Transport = r . Transport . Merge ( o . Transport ) } return r }
// Merge combines all values in this configuration with the values in the other
// configuration, with values in the other configuration taking precedence.
// Maps and slices are merged, most other values are overwritten. Complex
// structs define their own merge functionality.
Merge combines all values in this configuration with the values in the other configuration with values in the other configuration taking precedence . Maps and slices are merged most other values are overwritten . Complex structs define their own merge functionality .