mirror of https://github.com/status-im/consul.git
Don't panic on nil UpstreamConfiguration.Clone()
This commit is contained in:
parent
131599bfab
commit
a0f3591aee
|
@ -217,6 +217,10 @@ type UpstreamConfiguration struct {
|
|||
}
|
||||
|
||||
func (c *UpstreamConfiguration) Clone() *UpstreamConfiguration {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var c2 UpstreamConfiguration
|
||||
if len(c.Overrides) > 0 {
|
||||
c2.Overrides = make([]*UpstreamConfig, 0, len(c.Overrides))
|
||||
|
|
Loading…
Reference in New Issue