Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other missing currencies #9

Merged
merged 5 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
## v0.3.1 (Released 2023-09-10)
## v0.3.2 (Released 2024-09-10)

Improvements

- Add new Yuan Fen currency code (CNH)
- Update dependencies

## v0.3.1 (Released 2024-09-10)

IMPROVEMENTS

Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ module github.com/moov-io/iso4217

go 1.20

require github.com/stretchr/testify v1.8.4

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.8.4 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
4 changes: 3 additions & 1 deletion iso4217.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// specific language governing permissions and limitations
// under the License.

// Generated on 2023-07-25T04:47:20Z by daniel, any modifications will be overwritten
package iso4217

type CurrencyCode struct {
Expand Down Expand Up @@ -75,6 +74,7 @@ var (
CLP = CurrencyCode{Code: "CLP", NumericCode: "152", Name: "Chilean Peso", DecimalPlaces: 0}
CLF = CurrencyCode{Code: "CLF", NumericCode: "990", Name: "Unidad de Fomento", DecimalPlaces: 4}
CNY = CurrencyCode{Code: "CNY", NumericCode: "156", Name: "Yuan Renminbi", DecimalPlaces: 2}
CNH = CurrencyCode{Code: "CNH", NumericCode: "157", Name: "Yuan Fen", DecimalPlaces: 2}
COP = CurrencyCode{Code: "COP", NumericCode: "170", Name: "Colombian Peso", DecimalPlaces: 2}
COU = CurrencyCode{Code: "COU", NumericCode: "970", Name: "Unidad de Valor Real", DecimalPlaces: 2}
KMF = CurrencyCode{Code: "KMF", NumericCode: "174", Name: "Comorian Franc", DecimalPlaces: 0}
Expand Down Expand Up @@ -297,6 +297,8 @@ var lookupTable = map[string]CurrencyCode{
"990": CLF, // Unidad de Fomento
"CNY": CNY, // Yuan Renminbi
"156": CNY, // Yuan Renminbi
"CNH": CNH, // Yuan Fen
"157": CNH, // Yuan Fen
"COP": COP, // Colombian Peso
"170": COP, // Colombian Peso
"COU": COU, // Unidad de Valor Real
Expand Down
182 changes: 0 additions & 182 deletions iso4217_gen.go

This file was deleted.

4 changes: 0 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ endif
clean:
@rm -rf ./bin/ ./tmp/ coverage.txt misspell* staticcheck lint-project.sh

.PHONY: generate
generate: clean
@go run iso4217_gen.go

.PHONY: cover-test cover-web
cover-test:
go test -coverprofile=cover.out ./...
Expand Down
Loading