-
Notifications
You must be signed in to change notification settings - Fork 117
add motion get-pose to the cli #4945
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
Conversation
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.
A couple small questions, otherwise looks good to me
var commonPartFlags = []cli.Flag{ | ||
&AliasStringFlag{ | ||
cli.StringFlag{ | ||
Name: generalFlagPart, | ||
Aliases: []string{generalFlagPartID, generalFlagPartName}, | ||
Required: true, | ||
}, | ||
}, | ||
&AliasStringFlag{ | ||
cli.StringFlag{ | ||
Name: generalFlagOrganization, | ||
Aliases: []string{generalFlagAliasOrg, generalFlagOrgID, generalFlagAliasOrgName}, | ||
}, | ||
}, | ||
&AliasStringFlag{ | ||
cli.StringFlag{ | ||
Name: generalFlagLocation, | ||
Aliases: []string{generalFlagLocationID, generalFlagAliasLocationName}, | ||
}, | ||
}, | ||
&AliasStringFlag{ | ||
cli.StringFlag{ | ||
Name: generalFlagMachine, | ||
Aliases: []string{generalFlagAliasRobot, generalFlagMachineID, generalFlagMachineName}, | ||
}, | ||
}, | ||
} | ||
|
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.
👍
Flags: append(commonPartFlags, []cli.Flag{ | ||
&cli.StringFlag{ | ||
Name: "component", | ||
Required: true, | ||
}, | ||
}...), |
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 already have a component-name
flag, is that not sufficient? I think generalizing the use of the existing flag (adding aliasing if necessary) is good for preventing bloat and ensuring consistency.
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.
I hate it.
it makes sense when it makes sense, but overuse creates issues too
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.
Can you elaborate? I don't need this to be a blocker and I'm happy to approve at this point but to my knowledge this will be the only instance of a flag with a name hard-coded like this as opposed to using a variable (or certainly the only intentional instance). I'd love to understand why for better maintaining the CLI going forward.
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.
Variables are good for things that change, where the string itself isn't important.
here, the string is literally the api.
No description provided.