Skip to content

Commit

Permalink
fix potential panic with CRD string method
Browse files Browse the repository at this point in the history
Signed-off-by: Icarus9913 <[email protected]>
  • Loading branch information
Icarus9913 authored and robot committed Aug 10, 2023
1 parent aca4f5d commit a6413d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/k8s/apis/spiderpool.spidernet.io/v2beta1/types_string.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (in *IPPoolStatus) String() string {
}

s := strings.Join([]string{`&IPPoolStatus{`,
`AllocatedIPs:` + fmt.Sprintf("%+v", in.AllocatedIPs) + `,`,
`AllocatedIPs:` + stringutil.ValueToStringGenerated(in.AllocatedIPs) + `,`,
`TotalIPCount:` + stringutil.ValueToStringGenerated(in.TotalIPCount) + `,`,
`AllocatedIPCount:` + stringutil.ValueToStringGenerated(in.AllocatedIPCount) + `,`,
`}`,
Expand Down Expand Up @@ -204,7 +204,7 @@ func (in *SubnetStatus) String() string {
}

s := strings.Join([]string{`SubnetStatus{`,
`ControlledIPPools:` + fmt.Sprintf("%v", in.ControlledIPPools) + `,`,
`ControlledIPPools:` + stringutil.ValueToStringGenerated(in.ControlledIPPools) + `,`,
`TotalIPCount:` + stringutil.ValueToStringGenerated(in.TotalIPCount) + `,`,
`AllocatedIPCount:` + stringutil.ValueToStringGenerated(in.AllocatedIPCount) + `,`,
`}`,
Expand Down

0 comments on commit a6413d7

Please sign in to comment.