Skip to content

Commit b3fdb9d

Browse files
authored
Merge pull request #605 from jshufro/jms/v2/minipool-status-cleanup
Tidy up some print statements in rocketpool-cli/commands/minipool/status.go
2 parents ea445a0 + 64975f8 commit b3fdb9d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

rocketpool-cli/commands/minipool/status.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ func getStatus(c *cli.Context) error {
7070

7171
// Return if all minipools are finalized and they are hidden
7272
if len(status.Data.Minipools) == len(finalisedMinipools) && !c.Bool(statusIncludeFinalizedFlag) {
73-
fmt.Println("All of this node's minipools have been finalized.\nTo show finalized minipools, re-run this command with the `-f` flag.")
73+
fmt.Println("All of this node's minipools have been finalized.")
74+
fmt.Println("To show finalized minipools, re-run this command with the `-f` flag.")
7475
return nil
7576
}
7677

@@ -85,7 +86,7 @@ func getStatus(c *cli.Context) error {
8586
if statusName == "Withdrawable" {
8687
fmt.Println("(Withdrawal may not be available until after withdrawal delay)")
8788
}
88-
fmt.Println("")
89+
fmt.Println()
8990

9091
// Minipools
9192
for _, minipool := range minipools {
@@ -94,39 +95,39 @@ func getStatus(c *cli.Context) error {
9495
}
9596
}
9697

97-
fmt.Println("")
98+
fmt.Println()
9899
}
99100

100101
// Handle finalized minipools
101102
if c.Bool(statusIncludeFinalizedFlag) {
102103
fmt.Printf("%d finalized minipool(s):\n", len(finalisedMinipools))
103-
fmt.Println("")
104+
fmt.Println()
104105

105106
// Minipools
106107
for _, minipool := range finalisedMinipools {
107108
printMinipoolDetails(minipool, status.Data.LatestDelegate)
108109
}
109110
} else {
110111
fmt.Printf("%d finalized minipool(s) (hidden)\n", len(finalisedMinipools))
111-
fmt.Println("")
112+
fmt.Println()
112113
}
113114

114-
fmt.Println("")
115+
fmt.Println()
115116

116117
// Print actionable minipool details
117118
if len(refundableMinipools) > 0 {
118119
fmt.Printf("%d minipool(s) have refunds available:\n", len(refundableMinipools))
119120
for _, minipool := range refundableMinipools {
120121
fmt.Printf("- %s (%.6f ETH to claim)\n", minipool.Address.Hex(), math.RoundDown(eth.WeiToEth(minipool.Node.RefundBalance), 6))
121122
}
122-
fmt.Println("")
123+
fmt.Println()
123124
}
124125
if len(closeableMinipools) > 0 {
125126
fmt.Printf("%d dissolved minipool(s) can be closed once Beacon Chain withdrawals are enabled:\n", len(closeableMinipools))
126127
for _, minipool := range closeableMinipools {
127128
fmt.Printf("- %s (%.6f ETH to claim)\n", minipool.Address.Hex(), math.RoundDown(eth.WeiToEth(minipool.Balances.Eth), 6))
128129
}
129-
fmt.Println("")
130+
fmt.Println()
130131
}
131132

132133
// Return
@@ -209,6 +210,5 @@ func printMinipoolDetails(minipool api.MinipoolDetails, latestDelegate common.Ad
209210
fmt.Printf("%s*Minipool can be upgraded to delegate %s!%s\n", terminal.ColorYellow, latestDelegate.Hex(), terminal.ColorReset)
210211
}
211212

212-
fmt.Printf("\n")
213-
213+
fmt.Println()
214214
}

0 commit comments

Comments
 (0)