From bb66fa6f5a55d34ee5a98ba2e4d1b06c9e05aadb Mon Sep 17 00:00:00 2001 From: Timothy Date: Sat, 24 Oct 2020 14:49:23 +0800 Subject: [PATCH] update default currencies --- cmd/er/main.go | 6 +++--- go.mod | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/er/main.go b/cmd/er/main.go index ec97a3a..39ae134 100644 --- a/cmd/er/main.go +++ b/cmd/er/main.go @@ -13,9 +13,9 @@ import ( "github.com/olekukonko/tablewriter" ) -const defaultFromt = "USD" +const defaultFrom = "USD" -var defaultTo = []string{"USD", "CNY", "EUR", "GBP", "CAD", "AUD", "JPY"} +var defaultTo = []string{"USD", "CNY", "SGD", "EUR", "GBP", "CAD", "AUD", "JPY"} var defaultAPIKeyPath = filepath.Join(os.Getenv("HOME"), ".er") func main() { @@ -131,7 +131,7 @@ func parseArgs(args []string) (string, float32, []string) { } if len(args) == 1 { - from = defaultFromt + from = defaultFrom amount = 1 to = defaultTo } diff --git a/go.mod b/go.mod index 09f6b32..bf2dd47 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module github.com/TimothyYe/exchangerate +go 1.15 + require ( github.com/fatih/color v1.7.0 github.com/mattn/go-colorable v0.0.9 // indirect