-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Cleanup help to bring concise self-help message #5788
Conversation
|
05ff080
to
3fdd7db
Compare
Codecov Report
@@ Coverage Diff @@
## master #5788 +/- ##
==========================================
+ Coverage 59.79% 59.93% +0.14%
==========================================
Files 194 194
Lines 29531 29660 +129
==========================================
+ Hits 17657 17776 +119
- Misses 10371 10381 +10
Partials 1503 1503
Continue to review full report at Codecov.
|
|
3fdd7db
to
111090e
Compare
Mint Automation
5788-111090e/mint-gateway-azure.sh.log:
|
cmd/gateway/sia/gateway-sia.go
Outdated
|
||
logger.StartupMessage(colorBlue("\nSia Configuration:")) | ||
logger.StartupMessage(colorBlue(" API Address:") + colorBold(fmt.Sprintf(formatStr(len(sia.Address), 7), sia.Address)) + "\n") | ||
logger.StartupMessage(colorBlue(" Staging Directory:") + colorBold(fmt.Sprintf(" %s", sia.TempDir)) + "\n") |
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.
how is 7
arrived at? does it work for all terminal sizes?
Also, if there is only one place where formatStr
is being called, can't we replace it with fmt.Sprintf("%ds", len(sia.Address), 7)
?
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.
Oh we can I just generalized it. It works for most terminals starting from 80x25 . Its the same style used in our startup messages.
111090e
to
2192186
Compare
Description
Cleanup help to bring concise self-help message
Motivation and Context
Cleanup
How Has This Been Tested?
Manually
Types of changes
Checklist:
mint
PR # here: )