Skip to content

fix: Correct typos, improve documentation clarity, and remove dead code#4511

Merged
appleboy merged 2 commits intogin-gonic:masterfrom
mahanadh:master
Feb 13, 2026
Merged

fix: Correct typos, improve documentation clarity, and remove dead code#4511
appleboy merged 2 commits intogin-gonic:masterfrom
mahanadh:master

Conversation

@mahanadh
Copy link
Copy Markdown
Contributor

@mahanadh mahanadh commented Feb 4, 2026

Description

This PR addresses several minor but meaningful improvements to code quality and documentation:

Changes

  1. Typo Fix in Tests (recovery_test.go)

    • Fixed typo "Oupps" → "Oops" in panic messages across 13 test occurrences
    • The famous "Houston, we have a problem" phrase was misspelled
  2. Documentation Improvement (context.go)

    • Fixed confusing comment in Bind() and ShouldBind() methods
    • Old: "It parses the request's body as JSON if Content-Type == "application/json" using JSON or XML as a JSON input"
    • New: "It parses the request's body based on the Content-Type (e.g., JSON or XML)"
    • Also corrected "json payload" to "payload" since it's not always JSON
  3. Documentation Fix (routergroup.go)

    • Removed extra period in StaticFileFS comment (was instead.., now instead.)
    • Fixed Pull Request Guideline link
  4. Dead Code Removal (errors.go)

    • Removed ErrorTypeNu constant which:
      • Had the same comment as ErrorTypeAny ("indicates any other error")
      • Was never used anywhere in the codebase
      • Had a confusing/incomplete name (Nu seems like a typo or abbreviation)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update
  • Code cleanup/refactoring

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • All tests pass locally

- Fix typo "Oupps" to "Oops" in recovery test panic messages
- Fix confusing documentation in Bind() and ShouldBind() methods
  that incorrectly stated "JSON or XML as a JSON input"
- Remove double period in StaticFileFS documentation comment
- Remove unused ErrorTypeNu constant that had duplicate comment
  with ErrorTypeAny and was never used in the codebase
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.07%. Comparing base (3dc1cd6) to head (322465c).
⚠️ Report is 240 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4511      +/-   ##
==========================================
- Coverage   99.21%   99.07%   -0.14%     
==========================================
  Files          42       46       +4     
  Lines        3182     3038     -144     
==========================================
- Hits         3157     3010     -147     
- Misses         17       19       +2     
- Partials        8        9       +1     
Flag Coverage Δ
?
--ldflags="-checklinkname=0" -tags sonic 99.07% <ø> (?)
-tags go_json 98.93% <ø> (?)
-tags nomsgpack 98.99% <ø> (?)
go-1.18 ?
go-1.19 ?
go-1.20 ?
go-1.21 ?
go-1.24 99.01% <ø> (?)
go-1.25 99.07% <ø> (?)
macos-latest 99.01% <ø> (-0.21%) ⬇️
ubuntu-latest 99.07% <ø> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mahanadh
Copy link
Copy Markdown
Contributor Author

mahanadh commented Feb 6, 2026

@appleboy @thinkerou @manucorporat Hey folks, just some minor improvements and fixes. Please help review, thanks!

@appleboy appleboy added this to the v1.12 milestone Feb 13, 2026
@appleboy appleboy merged commit 8e07d37 into gin-gonic:master Feb 13, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants