Skip to content

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