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

Handle conversion of boolean query parameters with a value of "false" #7541

Merged
merged 1 commit into from Apr 30, 2015

Conversation

csrwng
Copy link
Contributor

@csrwng csrwng commented Apr 30, 2015

No description provided.

@csrwng
Copy link
Contributor Author

csrwng commented Apr 30, 2015

@smarterclayton ptal

@@ -74,6 +74,8 @@ func convertStringSliceToBool(input *[]string, out *bool, s conversion.Scope) er
switch strings.ToLower((*input)[0]) {
case "true", "1":
*out = true
case "false", "0":
*out = false
default:
*out = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably omit the case "true", "1" now - this is confusing at first sight. Add a comment that only false and 0 resolve to false, all other non-zero length values are true.

@csrwng csrwng force-pushed the fix_bool_conversion branch 3 times, most recently from 3fd286f to a049ccb Compare April 30, 2015 13:18
@csrwng
Copy link
Contributor Author

csrwng commented Apr 30, 2015

updated and added more tests

@smarterclayton
Copy link
Contributor

LGTM, travis flake rerunning

@smarterclayton smarterclayton added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 30, 2015
cjcullen added a commit that referenced this pull request Apr 30, 2015
Handle conversion of boolean query parameters with a value of "false"
@cjcullen cjcullen merged commit b11f07b into kubernetes:master Apr 30, 2015
@csrwng csrwng deleted the fix_bool_conversion branch July 28, 2015 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants