-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
add --quiet=true for swag init, make the debug logger quiet. #1206
Conversation
cmd/swag/main.go
Outdated
@@ -29,9 +30,14 @@ const ( | |||
parseDepthFlag = "parseDepth" | |||
instanceNameFlag = "instanceName" | |||
overridesFileFlag = "overridesFile" | |||
quiet = "quiet" |
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 prefer the q
flag in favor of quiet
.
If this flag disables all info output, we may use s
for silent.
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 prefer the
q
flag in favor ofquiet
. If this flag disables all info output, we may uses
for silent.
I add a alias q
, is that ok for you?
https://github.com/jixiuf/swag/blob/quiet_flag/cmd/swag/main.go#L39
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.
ok
Codecov Report
@@ Coverage Diff @@
## master #1206 +/- ##
==========================================
- Coverage 95.06% 94.71% -0.36%
==========================================
Files 12 11 -1
Lines 2532 2477 -55
==========================================
- Hits 2407 2346 -61
- Misses 68 71 +3
- Partials 57 60 +3
Continue to review full report at Codecov.
|
614a68d
to
d853924
Compare
cmd/swag/main.go
Outdated
) | ||
|
||
var initFlags = []cli.Flag{ | ||
&cli.BoolFlag{ | ||
Name: quietFlag, | ||
Aliases: []string{q}, |
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.
You forgot to add the quotes :)
Error: vet: cmd/swag/main.go:40:21: undeclared name: q
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.
Sorry for that. now done.
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.
LGTM
@jixiuf Thanks for your contribution. |
Describe the PR
Add a
--quiet
=true flag forswag init
.make the debug logger quiet.
Relation issue
#1193