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

Permit zero in cuttlefish duration datatype #229

Open
wants to merge 1 commit into
base: develop-3.0
Choose a base branch
from

Conversation

joecaswell
Copy link

When parsing a duration, the current regular expression for "integer" prohibits values that have a leading '0'. This also include the value "0ms", such as in the AAE throttle setting anti_entropy.throttle.tier1.delay = 0ms.

The list_to_integer call in the integer definition deals with the leading zeros properly. However, if it is desired to prohibit leading zeros for aesthetic reasons while permitting the value '0ms', the regular expression ( ([1-9] [0-9]* ) / "0" ) can be used.

@martincox martincox changed the base branch from develop to develop-3.0 January 25, 2022 15:35
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.

1 participant