You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
func (c *cloudformationStopInstancesCommand) Help() string {
helpText := `
Usage: cloudformation stop-instances [options]
Stops all instances in the given cloudformation stack
Options:
-stackname=stackname The name of the cloudformation stack
-region=region The AWS region
`
return strings.TrimSpace(helpText)
}
but I was wondering if it possible to generate the Options section from the options usage params?
stackname := cmdFlags.String("stackname", "", "The name of the cloudformation stack")
region := cmdFlags.String("region", "", "The AWS region")
Right now I am duplicating the usage strings. I feel like I'm doing something wrong here..
The text was updated successfully, but these errors were encountered:
You can, but I don't think its this packages job to do so. I purposely designed the "cli" package to not care about command line parsing, which I viewed as a separate and complex task in its own right. That is why this package only deals with []string and doesn't do any CLI parsing, allowing you to use flag or any 3rd party flag parsing.
If another tool lets you turn your options into help text, I'd recommend you use that on top of CLI, rather than it being built in here.
I have the following help text:
but I was wondering if it possible to generate the
Options
section from the options usage params?Right now I am duplicating the usage strings. I feel like I'm doing something wrong here..
The text was updated successfully, but these errors were encountered: