diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-05-04 16:43:18 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-05-04 16:43:18 +0800 |
commit | 464f30d3012f73b92e82977e5e6999d08376ea6a (patch) | |
tree | c2bf691c5bc6a4aaf8bc9f9006925252252c2c8f /cmd | |
parent | 8a28408616cab76bf756170a4f39025c821e4d21 (diff) | |
download | dexon-464f30d3012f73b92e82977e5e6999d08376ea6a.tar.gz dexon-464f30d3012f73b92e82977e5e6999d08376ea6a.tar.zst dexon-464f30d3012f73b92e82977e5e6999d08376ea6a.zip |
cmd/faucet: fix period to days conversion
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/faucet/faucet.go | 9 |
1 files changed, 5 insertions, 4 deletions
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") |