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

fix: update usage template to only show flags when present #273

Merged
merged 2 commits into from
May 10, 2024

Conversation

k3llymariee
Copy link
Contributor

updates the operation usage template to only show a header for required/optional flags if they're actually there. also removes the template for resources in favor of this singular template now.

truly don't know if this is the Best Way to handle this as I'm not familiar with templates, but it works!

before:
image

after:
image

and also resources work now too, though to be honest I don't know how Flags: is showing up there 🤔
image

@k3llymariee k3llymariee requested a review from dbolson May 10, 2024 23:24
@@ -210,7 +210,7 @@ func NewResourceCmd(
},
}

cmd.SetUsageTemplate(getResourceUsageTemplate())
cmd.SetUsageTemplate(OperationUsageTemplate())
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still an accurate name, or should we rename it to not be resource- or operation-specific?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah maybe SubcommandUsageTemplate?

@k3llymariee k3llymariee merged commit 68e6b5c into main May 10, 2024
2 checks passed
@k3llymariee k3llymariee deleted the kelly/fix-usage-template branch May 10, 2024 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants