From cfd5c8d038f23f6a2e591e2064408f1f60523405 Mon Sep 17 00:00:00 2001 From: Adrian Gallagher Date: Sun, 22 Mar 2015 15:45:46 +1100 Subject: [PATCH] Added common IsEnabled function to output a string. --- common.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common.go b/common.go index 8bf2fb26..3398866b 100644 --- a/common.go +++ b/common.go @@ -103,6 +103,14 @@ func RoundFloat(x float64, prec int) float64 { return rounder / pow } +func IsEnabled(isEnabled bool) (string) { + if isEnabled { + return "Enabled" + } else { + return "Disabled" + } +} + func CalculateAmountWithFee(amount, fee float64) (float64) { return amount + CalculateFee(amount, fee) }