Skip to content

Commit

Permalink
added new packages depency for notation and thausands
Browse files Browse the repository at this point in the history
  • Loading branch information
jagottsicher committed Sep 30, 2022
1 parent b1f48b6 commit 503dc5e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ go 1.17

require (
github.com/efekarakus/termcolor v1.0.1
github.com/floscodes/golang-thousands v0.0.0-20210816125925-ff456bdeae02
github.com/gookit/color v1.5.2
github.com/hisamafahri/coco v1.0.0
golang.org/x/text v0.3.7
)

require (
Expand Down
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/efekarakus/termcolor v1.0.1 h1:YAKFO3bnLrqZGTWyNLcYoSIAQFKVOmbqmDnwsU/znzg=
github.com/efekarakus/termcolor v1.0.1/go.mod h1:AitrZNrE4nPO538fRsqf+p0WgLdAsGN5pUNrHEPsEMM=
github.com/floscodes/golang-thousands v0.0.0-20210816125925-ff456bdeae02 h1:WfTXTb5dVZ9SNcP6kJhSFyXefW9UjVPMM+HMc7BT96s=
github.com/floscodes/golang-thousands v0.0.0-20210816125925-ff456bdeae02/go.mod h1:pucKZ1dSTOcg/FjqrlevSJCvrzbqJgmu9SPVSUWJWjA=
github.com/gookit/color v1.5.2 h1:uLnfXcaFjlrDnQDT+NCBcfhrXqYTx/rcCa6xn01Y8yI=
github.com/gookit/color v1.5.2/go.mod h1:w8h4bGiHeeBpvQVePTutdbERIUf3oJE5lZ8HM0UgXyg=
github.com/hisamafahri/coco v1.0.0 h1:rZ+AcdOs6V2W1k7wMI5QwlCix8YsM9QCfQ5YxZpJ6qo=
Expand All @@ -22,9 +24,6 @@ golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44 h1:Bli41pIlzTzf3KEY06n+xnzK/BESIg2ze4Pgfh/aI8c=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
Binary file modified turn
Binary file not shown.
12 changes: 6 additions & 6 deletions turn.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import (
"strings"

"github.com/efekarakus/termcolor"
thousands "github.com/floscodes/golang-thousands"
"github.com/gookit/color"
"github.com/hisamafahri/coco"
"golang.org/x/text/language"
"golang.org/x/text/message"
)

const usage = `
Expand Down Expand Up @@ -355,8 +354,9 @@ func main() {
}
fmt.Printf("%d", decimalValue)
if verboseFlag {
p := message.NewPrinter(language.English)
p.Printf(" %d (English notation)\n", decimalValue)
//p := message.NewPrinter(language.English)
p, _ := thousands.Separate(decimalValue, "en")
fmt.Printf(" %v (English notation)\n", p)
} else {
fmt.Print("\n")
}
Expand Down Expand Up @@ -626,8 +626,8 @@ func main() {
}
fmt.Printf("%d", decimalValue)
if verboseFlag {
p := message.NewPrinter(language.English)
p.Printf(" %d (English notation)\n", decimalValue)
p, _ := thousands.Separate(decimalValue, "en")
fmt.Printf(" %v (English notation)\n", p)
} else {
fmt.Print("\n")
}
Expand Down

0 comments on commit 503dc5e

Please sign in to comment.