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

Set CurrencyPrecision default value to 0 #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

take
Copy link
Contributor

@take take commented Jun 27, 2022

since 0 for int means empty,

&generator.Options{CurrencyPrecision: 0}

doesn't work unless we set the default value to 0

since 0 for int means empty, 

```
&generator.Options{CurrencyPrecision: 0}
```

doesn't work unless we set the default value to 0
@angelodlfrtr
Copy link
Owner

angelodlfrtr commented Jan 6, 2023

Hi @take,

Thank you very much for your PR.

I think precision of 2 is a good default. One solution here should be to use pointers in Options fields so 0 would not be considered as a null value by the default library.

However it will break the current api so it will be part of a new major release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants