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

Remove preceding white space from cobra help template #5730

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thelovekesh
Copy link

While printing the usage text, I noticed there is always a empty line before the usage text. This was due to not using trim marker in cobra help text template. This PR fixes that.

- What I did
Remove preceding white space from cobra help template

- How I did it
Add a trim marker before printing the help template.

- How to verify it
Before:

$ ./build/docker                              

Usage:  docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

...

Build the cli on this branch and re-run the binary. Now it will output:

$ ./build/docker
Usage:  docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

...

Please note the there is no line before usage text.

- Description for the changelog

Remove preceding white space from cobra help template

- A picture of a cute animal (not mandatory but encouraged)

@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.51%. Comparing base (667ece3) to head (d5d449b).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5730      +/-   ##
==========================================
+ Coverage   59.13%   59.51%   +0.37%     
==========================================
  Files         343      346       +3     
  Lines       29370    29376       +6     
==========================================
+ Hits        17369    17483     +114     
+ Misses      11029    10923     -106     
+ Partials      972      970       -2     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants