From 464f30d3012f73b92e82977e5e6999d08376ea6a Mon Sep 17 00:00:00 2001 From: Péter Szilágyi Date: Thu, 4 May 2017 11:43:18 +0300 Subject: cmd/faucet: fix period to days conversion --- cmd/faucet/faucet.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cmd/faucet') diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go index 2a9a74593..f672433ee 100644 --- a/cmd/faucet/faucet.go +++ b/cmd/faucet/faucet.go @@ -108,10 +108,11 @@ func main() { if period%60 == 0 { period /= 60 periods[i] = fmt.Sprintf("%d hours", period) - } - if period%24 == 0 { - period /= 24 - periods[i] = fmt.Sprintf("%d days", period) + + if period%24 == 0 { + period /= 24 + periods[i] = fmt.Sprintf("%d days", period) + } } if period == 1 { periods[i] = strings.TrimSuffix(periods[i], "s") -- cgit