Skip to content

Commit 5352198

Browse files
authored
Merge pull request #6032 from DiptoChakrabarty/stringer
🌱 modify and implement fmt.Stringer with value receiver
2 parents e5e1b62 + 0e855f0 commit 5352198

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

api/v1beta1/cluster_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ type NetworkRanges struct {
218218
CIDRBlocks []string `json:"cidrBlocks"`
219219
}
220220

221-
func (n *NetworkRanges) String() string {
222-
if n == nil {
221+
func (n NetworkRanges) String() string {
222+
if len(n.CIDRBlocks) == 0 {
223223
return ""
224224
}
225225
return strings.Join(n.CIDRBlocks, ",")

test/infrastructure/docker/internal/docker/types/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func (n *Node) WithStatus(status string) *Node {
5858
}
5959

6060
// String returns the name of the node.
61-
func (n *Node) String() string {
61+
func (n Node) String() string {
6262
return n.Name
6363
}
6464

0 commit comments

Comments
 (0)