Use printf in template
This commit is contained in:
@ -44,11 +44,6 @@ func (tx Transaction) GetAmount() float64 {
|
||||
return amount
|
||||
}
|
||||
|
||||
func (tx Transaction) GetAmountString() string {
|
||||
amount := tx.GetAmount()
|
||||
return fmt.Sprintf("%.2f", amount)
|
||||
}
|
||||
|
||||
func (tx Transaction) GetPositive() bool {
|
||||
amount := tx.GetAmount()
|
||||
return amount >= 0
|
||||
|
Reference in New Issue
Block a user