Exemplo n.º 1
0
func (c *Config) Copy() *Config {
	nc := new(Config)
	*nc = *c
	nc.Node = nc.Node.Copy()
	nc.Servers = structs.CopySliceString(nc.Servers)
	nc.Options = structs.CopyMapStringString(nc.Options)
	return nc
}
Exemplo n.º 2
0
func (c *Config) Copy() *Config {
	nc := new(Config)
	*nc = *c
	nc.Node = nc.Node.Copy()
	nc.Servers = structs.CopySliceString(nc.Servers)
	nc.Options = structs.CopyMapStringString(nc.Options)
	nc.GloballyReservedPorts = structs.CopySliceInt(c.GloballyReservedPorts)
	nc.ConsulConfig = c.ConsulConfig.Copy()
	nc.VaultConfig = c.VaultConfig.Copy()
	return nc
}