Repository navigation
prevent removal of valid arguments - #95
Merged
Merged
Conversation
Collaborator
|
Add a test case please. |
deads2k
force-pushed
the
deads-prevent-extra-removal
branch
from
April 24, 2015 17:07
800a992 to
8c78327
Compare
Contributor
Author
|
test added. |
Collaborator
|
LGTM. @brendandburns can you review as well? Impacts kube in a few places. |
Collaborator
There was a problem hiding this comment.
Being always the bikeshedder, I like this better (and think it's faster, more readable, more efficient...) What do you think?
Contributor
Author
There was a problem hiding this comment.
What do you think?
I'm not against it, except for it not working:
[deads@deads-dev-01 cobra]$ go test
Error: unknown command "one"
Run 'print help' for usage.
--- FAIL: TestChildSameName (0.00 seconds)
cobra_test.go:345: Wrong command called
cobra_test.go:348: Command didn't parse correctly
I checked in a similar version that passes.
Collaborator
There was a problem hiding this comment.
@deads2k yeah, so I guess my version was actually mutating the original slice, rather than creating a new slice with just the correct data. Thanks for the new (working) version!
deads2k
force-pushed
the
deads-prevent-extra-removal
branch
from
April 28, 2015 11:58
8c78327 to
36aee64
Compare
Collaborator
|
LGTM |
smarterclayton
added a commit
that referenced
this pull request
Apr 28, 2015
prevent removal of valid arguments
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.
running a command like:
where
adminandmy-userare arguments to theopenshift admin policy add-role-to-usercommand, removes theadminargument (args[4]).This pull stops removing more than one token from the
argsfor command matches.@smarterclayton Related to openshift/origin#1894