Skip to content

Conversation

@NyaaaWhatsUpDoc
Copy link

This fixes the regression introduced in v1.11.0 which stopped differentiating between nil and zero length (but not nil) slices when binding form values.

Pull Request Checklist

Please ensure your pull request meets the following requirements:

  • Open your pull request against the master branch.
  • All tests pass in available continuous integration systems (e.g., GitHub Actions).
  • Tests are added or modified as needed to cover code changes.
  • If the pull request introduces a new feature, the feature is documented in the docs/doc.md.

Thank you for contributing!

if cfTag == "" || cfTag == "multi" {
vs = strings.Split(opt.defaultValue, ",")
} else {
vs = []string{opt.defaultValue}
Copy link
Author

Choose a reason for hiding this comment

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

this isn't part of the fix (nor is it in the array part below), but it just means vs only needs to get written to once instead of twice in the case of cfTag == "" | cfTag == "multi"

@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4498      +/-   ##
==========================================
- Coverage   99.21%   98.99%   -0.22%     
==========================================
  Files          42       44       +2     
  Lines        3182     2992     -190     
==========================================
- Hits         3157     2962     -195     
- Misses         17       19       +2     
- Partials        8       11       +3     
Flag Coverage Δ
?
--ldflags="-checklinkname=0" -tags sonic 98.92% <100.00%> (?)
-tags go_json 98.85% <100.00%> (?)
-tags nomsgpack 98.98% <100.00%> (?)
go-1.18 ?
go-1.19 ?
go-1.20 ?
go-1.21 ?
go-1.24 98.93% <100.00%> (?)
go-1.25 98.99% <100.00%> (?)
macos-latest 98.99% <100.00%> (-0.22%) ⬇️
ubuntu-latest 98.93% <100.00%> (-0.29%) ⬇️

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