Skip to content

Conversation

@GLEF1X
Copy link

@GLEF1X GLEF1X commented Dec 22, 2025

This PR adds explicit interface types to variable declarations in binding_nomsgpack.go to allow third-party libraries to reassign bindings with custom implementations. binding.go has explicit interface types.

Related Issue

Without explicit interface types, variables like binding.JSON are typed as their concrete struct (e.g., jsonBinding) rather than the BindingBody interface. This prevents libraries from reassigning these variables with wrapper types that implement the same interface. Source.
This allows to fix DataDog/dd-trace-go#4114 where the missing explicit types prevent compilation when using the nomsgpack build tag.

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!

@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4478      +/-   ##
==========================================
- Coverage   99.21%   99.06%   -0.16%     
==========================================
  Files          42       44       +2     
  Lines        3182     2986     -196     
==========================================
- Hits         3157     2958     -199     
- Misses         17       18       +1     
- Partials        8       10       +2     
Flag Coverage Δ
?
--ldflags="-checklinkname=0" -tags sonic 98.98% <ø> (?)
-tags go_json 98.92% <ø> (?)
-tags nomsgpack 98.98% <ø> (?)
go-1.18 ?
go-1.19 ?
go-1.20 ?
go-1.21 ?
go-1.24 98.99% <ø> (?)
go-1.25 99.06% <ø> (?)
macos-latest 99.06% <ø> (-0.16%) ⬇️
ubuntu-latest 98.99% <ø> (-0.22%) ⬇️

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.

[Bug] v2.3.0 gin contrib breaks builds with -tags nomsgpack

1 participant