-
Notifications
You must be signed in to change notification settings - Fork 1
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
Parse string input for params of type Integer or Float #106
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
} | ||
} | ||
|
||
func TestDoGetIntArg(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add some tests for the regular (previously supported) cases too, now that we have tests for this (also for Float)
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
851db46
to
7bdc8a4
Compare
Go coverage report: Click to expand.
Go lint report: No issues found. 😎 |
* Parse strings as ints or floats for params of type Integer or Float * Add parser tests * Fix failing e2e test
* Parse strings as ints or floats for params of type Integer or Float * Add parser tests * Fix failing e2e test
* Parse strings as ints or floats for params of type Integer or Float * Add parser tests * Fix failing e2e test
…-floats-ints Parse string input for params of type Integer or Float (#106)
This PR will change the float and int parsing functions to be able to parse string input. If the param type is a string, it will attempt to use strconv.ParseFloat or strconv.ParseInt and if the string can be converted to a float, that float value will be used. This will allow more leniency for users input, and be more consistent with Graphite web. Graphite web's parsing of floats and strings can be found here