Skip to content

Fix compare original and formatted - #1915

Merged
sdghchj merged 1 commit into
swaggo:masterfrom
0daryo:fix-compare-original-and-formatted
Oct 25, 2024
Merged

sdghchj merged 1 commit into
swaggo:masterfrom
0daryo:fix-compare-original-and-formatted

Conversation

@0daryo

@0daryo 0daryo commented Oct 24, 2024

Copy link
Copy Markdown
Contributor

Describe the PR
Compare original and formatted.
FIx #1914

Relation issue
#1914

Additional context
Add any other context about the problem here.

Comment thread format/format_test.go
// @Summary Add a new pet to the store
// @Description get string by ID
// @Summary Add a new pet to the store
// @Description get string by ID

@0daryo 0daryo Oct 24, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Only space between // and @ should be formatted.
Before my fix. Test fails.

% go test -run TestFormat_Format -v                                                                                                                                     
=== RUN   TestFormat_Format
    format_test.go:16: 
                Error Trace:    format_test.go:16
                Error:          Should be true
                Test:           TestFormat_Format
--- FAIL: TestFormat_Format (0.00s)
FAIL
exit status 1

@sdghchj
sdghchj merged commit 9969858 into swaggo:master Oct 25, 2024
@0daryo

0daryo commented Oct 29, 2024

Copy link
Copy Markdown
Contributor Author

@sdghchj
Thank you for merging!
Is it possible to use this fix in v2 release?

Thiht pushed a commit to Thiht/swag that referenced this pull request Feb 28, 2025
stronger24 pushed a commit to stronger24/swag that referenced this pull request Jul 25, 2025
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.

Skipping overwrite in some case but should do.

2 participants

⌂ 换网址