Fixed version number discrepancy#4299
Merged
appleboy merged 1 commit intogin-gonic:masterfrom Jul 17, 2025
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4299 +/- ##
==========================================
- Coverage 99.21% 98.92% -0.30%
==========================================
Files 42 44 +2
Lines 3182 3437 +255
==========================================
+ Hits 3157 3400 +243
- Misses 17 26 +9
- Partials 8 11 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
We have verified that this change has written tests for all modified code. The Codecov report also shows that all modified lines are covered. The -0.30% decrease in overall coverage is likely due to the fact that the base branch is 142 commits older than master and does not affect this fix. We appreciate your confirmation. |
appleboy
approved these changes
Jul 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix mismatch between Go version check logic and warning message
Problem
There is a mismatch between the Go version check logic and the warning message shown to users:
const ginSupportMinGoVer = 21"[WARNING] Now Gin requires Go 1.23+\n"As a result, users running Go 1.21 or 1.22 cannot see the warning, even though the message states that 1.23+ is required.
Cause
The logic in
debugPrintWARNINGDefault():With ginSupportMinGoVer = 21, however, users on Go 1.21 (v = 21) or 1.22 (v = 22) don't trigger the warning (v < 21 is false).
Fix
Update the constant ginSupportMinGoVer to 23 to match the warning message indicating that Go 1.23+ is required.
This ensures users running Go versions below 1.23 will properly receive the warning,
aligning behavior with messaging.