forked from leavengood/donation_tracker
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename CurrencyCount to CurrencyAmounts
- Loading branch information
1 parent
b593a1a
commit 8d98ff6
Showing
4 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package main | ||
|
||
// Use a map because of multiple currencies | ||
type CurrencyCount map[string]float32 | ||
type CurrencyAmounts map[string]float32 | ||
|
||
func (c CurrencyCount) GrandTotal(eurToUsdRate float32) float32 { | ||
func (c CurrencyAmounts) GrandTotal(eurToUsdRate float32) float32 { | ||
return c["USD"] + c["EUR"]*eurToUsdRate | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters