Skip to content

refactor: use maps.copy for cleaner map handling#3123

Merged
zzzckck merged 1 commit intobnb-chain:developfrom
tongjicoder:develop
May 28, 2025
Merged

refactor: use maps.copy for cleaner map handling#3123
zzzckck merged 1 commit intobnb-chain:developfrom
tongjicoder:develop

Conversation

@tongjicoder
Copy link
Contributor

Description

Optimize code using a more modern writing style.

Rationale

tell us why we need these changes...

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

Signed-off-by: tongjicoder <tongjicoder@icloud.com>
@zzzckck zzzckck requested a review from Copilot May 28, 2025 02:55
Copy link
Contributor

Copilot AI left a comment

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 map copy operations to leverage the new maps.Copy function for cleaner and more concise map handling.

  • Replaces manual map copying loops with maps.Copy in websocket, http, client options, and metrics label handling.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
rpc/websocket.go Replaced manual copy of HTTP headers with maps.Copy.
rpc/http.go Replaced manual copy of HTTP headers with maps.Copy.
rpc/client_opt.go Replaced manual copy of header maps with maps.Copy.
metrics/label.go Replaced manual copy of label map with maps.Copy.

@zzzckck zzzckck merged commit f86e7b5 into bnb-chain:develop May 28, 2025
7 checks passed
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.

3 participants