Skip to content

Commit

Permalink
Add missing DeepCopy for Status
Browse files Browse the repository at this point in the history
Currently Status = []InterfaceStatus, so didn't become a problem, but
obviously, we should have it.

Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
  • Loading branch information
YutaroHayakawa committed May 5, 2024
1 parent aea1a81 commit 7697160
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion zz_generated_deepcopy.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// generated by deep-copy -pointer-receiver -type Config -type InterfaceConfig -type InterfaceStatus -o zz_generated_deepcopy.go .; DO NOT EDIT.
// generated by deep-copy -pointer-receiver -type Config -type Status -type InterfaceConfig -type InterfaceStatus -o zz_generated_deepcopy.go .; DO NOT EDIT.

package radv

Expand All @@ -17,6 +17,21 @@ func (o *Config) DeepCopy() *Config {
return &cp
}

// DeepCopy generates a deep copy of *Status
func (o *Status) DeepCopy() *Status {
var cp Status = *o
if o.Interfaces != nil {
cp.Interfaces = make([]*InterfaceStatus, len(o.Interfaces))
copy(cp.Interfaces, o.Interfaces)
for i2 := range o.Interfaces {
if o.Interfaces[i2] != nil {
cp.Interfaces[i2] = o.Interfaces[i2].DeepCopy()
}
}
}
return &cp
}

// DeepCopy generates a deep copy of *InterfaceConfig
func (o *InterfaceConfig) DeepCopy() *InterfaceConfig {
var cp InterfaceConfig = *o
Expand Down

0 comments on commit 7697160

Please sign in to comment.