Skip to content

Commit

Permalink
Merge pull request #2172 from Icarus9913/fix/wk/types-string
Browse files Browse the repository at this point in the history
fix potential panic with CRD string method
  • Loading branch information
weizhoublue authored Aug 10, 2023
2 parents a506a4b + 81eec5f commit 85a2ee6
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 85a2ee6

Please sign in to comment.