Skip to content

Commit

Permalink
fix: network list server count format (#783)
Browse files Browse the repository at this point in the history
The server count would previously show "0 server" instead of "0 servers"
  • Loading branch information
phm07 authored Jun 19, 2024
1 parent a8a61ca commit f69d261
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cmd/network/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var ListCmd = base.ListCmd{
AddFieldFn("servers", output.FieldFn(func(obj interface{}) string {
network := obj.(*hcloud.Network)
serverCount := len(network.Servers)
if serverCount <= 1 {
if serverCount == 1 {
return fmt.Sprintf("%v server", serverCount)
}
return fmt.Sprintf("%v servers", serverCount)
Expand Down

0 comments on commit f69d261

Please sign in to comment.