Skip to content

refactor(binding): use maps.Copy for cleaner map handling - #4352

Merged
appleboy merged 1 commit into
gin-gonic:masterfrom
russcoss:master
Sep 27, 2025
Merged

appleboy merged 1 commit into
gin-gonic:masterfrom
russcoss:master

Conversation

@russcoss

@russcoss russcoss commented Sep 14, 2025 •

Copy link
Copy Markdown
Contributor

There is a new function added in the go1.21 standard library, which can make the code more concise and easy to read.

@russcoss

Copy link
Copy Markdown
Contributor Author

@appleboy Hi, I have resolved the conflicts and rebased with the latest code. Please review it when you have time. Thanks.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the code to use the new maps.Copy function from Go 1.21 standard library to replace manual map copying with a more concise and idiomatic approach.

  • Imports the maps package from Go 1.21 standard library
  • Replaces manual for-loop map copying with maps.Copy function call

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@appleboy appleboy added this to the v1.12 milestone Sep 26, 2025
@appleboy appleboy changed the title refactor: use maps.Copy for cleaner map handling refactor(binding): use maps.Copy for cleaner map handling Sep 26, 2025
@codecov

codecov Bot commented Sep 26, 2025 •

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4352      +/-   ##
==========================================
- Coverage   99.21%   98.92%   -0.29%     
==========================================
  Files          42       44       +2     
  Lines        3182     3441     +259     
==========================================
+ Hits         3157     3404     +247     
- Misses         17       26       +9     
- Partials        8       11       +3     
Flag Coverage Δ
?
--ldflags="-checklinkname=0" -tags sonic 98.91% <100.00%> (?)
-tags go_json 98.85% <100.00%> (?)
-tags nomsgpack 98.91% <100.00%> (?)
go-1.18 ?
go-1.19 ?
go-1.20 ?
go-1.21 ?
go-1.23 98.92% <100.00%> (?)
go-1.24 98.92% <100.00%> (?)
go-1.25 98.92% <100.00%> (?)
macos-latest 98.92% <100.00%> (-0.29%) ⬇️
ubuntu-latest 98.92% <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.

@appleboy
appleboy merged commit 39858a0 into gin-gonic:master Sep 27, 2025
35 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants