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

add --quiet=true for swag init, make the debug logger quiet. #1206

Merged
merged 1 commit into from May 20, 2022

Conversation

jixiuf
Copy link
Contributor

@jixiuf jixiuf commented May 17, 2022

Describe the PR
Add a --quiet=true flag for swag init.
make the debug logger quiet.
Relation issue
#1193

cmd/swag/main.go Outdated
@@ -29,9 +30,14 @@ const (
parseDepthFlag = "parseDepth"
instanceNameFlag = "instanceName"
overridesFileFlag = "overridesFile"
quiet = "quiet"
Copy link
Contributor

@ubogdan ubogdan May 18, 2022

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.

Copy link
Contributor Author

@jixiuf jixiuf May 18, 2022

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.

I add a alias q, is that ok for you?
https://github.com/jixiuf/swag/blob/quiet_flag/cmd/swag/main.go#L39

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

@codecov
Copy link

codecov bot commented May 18, 2022

Codecov Report

Merging #1206 (37b3146) into master (5f6b402) will decrease coverage by 0.35%.
The diff coverage is 100.00%.

❗ Current head 37b3146 differs from pull request most recent head 2dcbb94. Consider uploading reports for the commit 2dcbb94 to get more accurate results

@@            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     
Impacted Files Coverage Δ
gen/gen.go 93.30% <100.00%> (ø)
parser.go 92.88% <100.00%> (-0.82%) ⬇️
packages.go 85.47% <0.00%> (-1.27%) ⬇️
operation.go 96.35% <0.00%> (-0.30%) ⬇️
golist.go

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f6b402...2dcbb94. Read the comment docs.

@jixiuf jixiuf force-pushed the quiet_flag branch 3 times, most recently from 614a68d to d853924 Compare May 18, 2022 15:31
cmd/swag/main.go Outdated
)

var initFlags = []cli.Flag{
&cli.BoolFlag{
Name: quietFlag,
Aliases: []string{q},
Copy link
Contributor

@ubogdan ubogdan May 19, 2022

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

Copy link
Contributor Author

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.

Copy link
Contributor

@ubogdan ubogdan left a comment

Choose a reason for hiding this comment

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

LGTM

@ubogdan ubogdan merged commit 3b580a0 into swaggo:master May 20, 2022
@ubogdan
Copy link
Contributor

ubogdan commented May 20, 2022

@jixiuf Thanks for your contribution.

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.

None yet

2 participants