Merged
Conversation
d53c3bc to
4ce54f3
Compare
abemedia
commented
Jul 11, 2025
| return typePrefix("UnixMicro") | ||
| case "unix-milli": | ||
| return typePrefix("UnixMilli") | ||
| case "decimal": //nolint:goconst // This whole switch is duplicated in NamePostfix. Should create a common helper. |
Contributor
Author
There was a problem hiding this comment.
See code comment. Will clean up to remove duplication of this switch in a separate PR. Just didn't want to pollute this one too much.
If you don't mind unrelated refactor going in this feature I can fix it on this PR though.
Comment on lines
+28
to
+38
| // SetExclusiveMinimum sets exclusive minimum value. | ||
| func (t *Decimal) SetExclusiveMinimum(v decimal.Decimal) { | ||
| t.MinExclusive = true | ||
| t.SetMinimum(v) | ||
| } | ||
|
|
||
| // SetExclusiveMaximum sets exclusive maximum value. | ||
| func (t *Decimal) SetExclusiveMaximum(v decimal.Decimal) { | ||
| t.MaxExclusive = true | ||
| t.SetMaximum(v) | ||
| } |
Contributor
Author
There was a problem hiding this comment.
I included these to match the float validator, although they actually aren't used anywhere (neither here nor float). Shall I remove?
Member
|
Hey @abemedia, please resolve conflicts |
4ce54f3 to
29a7e27
Compare
Contributor
Author
|
@ernado I have resolved conflicts. |
ernado
approved these changes
Oct 5, 2025
ernado
approved these changes
Oct 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for
format: decimalfor typesnumberandstringusing https://github.com/shopspring/decimal (the most widely used Go package for decimals, see https://pkg.go.dev/search?q=decimal).Closes #1478