Conversation
Signed-off-by: Marques Johansson <mjohansson@equinix.com>
…dition args Signed-off-by: Marques Johansson <mjohansson@equinix.com>
Signed-off-by: Marques Johansson <mjohansson@equinix.com>
Signed-off-by: Marques Johansson <mjohansson@equinix.com>
PR was made by manually walking the list of files in internal/ that did not specify Args and adding an Args definition. git grep -n -e NewCommand -e Cmd\ :\= $(git grep -L Args internal/) "docs", "emdocs", and "completion" were not included because they use Args and have an existing Args definition. Signed-off-by: Marques Johansson <mjohansson@equinix.com>
displague
commented
Aug 26, 2024
|
|
||
| retrieveProjectCmd.Flags().StringVarP(&projectName, "project", "n", "", "The name of the project.") | ||
| retrieveProjectCmd.Flags().StringVarP(&projectID, "id", "i", "", "The project's UUID, which can be specified in the config created by metal init or set as METAL_PROJECT_ID environment variable.") | ||
| retrieveProjectCmd.MarkFlagsMutuallyExclusive("id", "project") |
Member
Author
There was a problem hiding this comment.
This is the only change that is not Args: cobra.NoArgs,.
This takes advantage of MarkFlagsMutuallyExclusive to replace the conflicting id/project field che k in projects retrieve. This is the only location where this Cobra helper seemed to fit.
Contributor
There was a problem hiding this comment.
Member
Author
There was a problem hiding this comment.
Ahh. The second one is in this commit/cherry-pick. The first one was included in #485 and would be removed from this PR in a rebase.
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.
From #485 (comment)
(this PR should be rebased after that PR, cherry-pick 08407f8)