Skip to content

Commit

Permalink
Merge pull request #2179 from spidernet-io/robot/cherrypick/pr2172/re…
Browse files Browse the repository at this point in the history
…lease-v0.6

title:	fix potential panic with CRD string method
  • Loading branch information
weizhoublue authored Aug 10, 2023
2 parents aca4f5d + a6413d7 commit c9345f2
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 c9345f2

Please sign in to comment.