Skip to content

docs: add panic conditions documentation for SetMode and Redirect.Render#4608

Open
xingzihai wants to merge 1 commit intogin-gonic:masterfrom
xingzihai:docs-panic-conditions-extended
Open

docs: add panic conditions documentation for SetMode and Redirect.Render#4608
xingzihai wants to merge 1 commit intogin-gonic:masterfrom
xingzihai:docs-panic-conditions-extended

Conversation

@xingzihai
Copy link
Copy Markdown

This PR adds documentation for panic conditions in the following functions:

  1. SetMode (mode.go): Documents that it panics if the value is not a valid gin mode (debug, release, or test).

  2. Redirect.Render (render/redirect.go): Documents that it panics if the status code is not a valid redirect status code (300-308, except 201).

This is a continuation of the panic conditions documentation effort started in the previous PR.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.43%. Comparing base (3dc1cd6) to head (0fd0eab).
⚠️ Report is 275 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4608      +/-   ##
==========================================
- Coverage   99.21%   98.43%   -0.78%     
==========================================
  Files          42       48       +6     
  Lines        3182     3138      -44     
==========================================
- Hits         3157     3089      -68     
- Misses         17       40      +23     
- Partials        8        9       +1     
Flag Coverage Δ
?
--ldflags="-checklinkname=0" -tags sonic 98.42% <ø> (?)
-tags go_json 98.29% <ø> (?)
-tags nomsgpack 98.35% <ø> (?)
go-1.18 ?
go-1.19 ?
go-1.20 ?
go-1.21 ?
go-1.25 98.37% <ø> (?)
go-1.26 98.43% <ø> (?)
macos-latest 98.37% <ø> (-0.84%) ⬇️
ubuntu-latest 98.43% <ø> (-0.78%) ⬇️

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.

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.

1 participant