Skip to content

refactor(gin): migrate IP handling to net/netip package#4599

Open
shirshendubhowmick wants to merge 2 commits intogin-gonic:masterfrom
shirshendubhowmick:shirshendu/refactor-netip
Open

refactor(gin): migrate IP handling to net/netip package#4599
shirshendubhowmick wants to merge 2 commits intogin-gonic:masterfrom
shirshendubhowmick:shirshendu/refactor-netip

Conversation

@shirshendubhowmick
Copy link
Copy Markdown

Replaced usage of net.IP with net/netip

Key reasons (as per official go doc):

  • Less memory footprint
  • immutable
  • comparable

In short it's more modern & better alternative than net.IP. The changes here are non breaking change and backward compatible.

@shirshendubhowmick shirshendubhowmick force-pushed the shirshendu/refactor-netip branch from fcddb13 to d27dab6 Compare March 27, 2026 19:38
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4599      +/-   ##
==========================================
- Coverage   99.21%   98.43%   -0.78%     
==========================================
  Files          42       48       +6     
  Lines        3182     3133      -49     
==========================================
- Hits         3157     3084      -73     
- Misses         17       40      +23     
- Partials        8        9       +1     
Flag Coverage Δ
?
--ldflags="-checklinkname=0" -tags sonic 98.42% <100.00%> (?)
-tags go_json 98.29% <100.00%> (?)
-tags nomsgpack 98.34% <100.00%> (?)
go-1.18 ?
go-1.19 ?
go-1.20 ?
go-1.21 ?
go-1.25 98.43% <100.00%> (?)
go-1.26 98.37% <100.00%> (?)
macos-latest 98.37% <100.00%> (-0.85%) ⬇️
ubuntu-latest 98.43% <100.00%> (-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