Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(container/gmap): add generic map feature#4484

Merged
hailaz merged 44 commits intomasterfrom
feat/hash_kvmap
Nov 28, 2025
Merged

feat(container/gmap): add generic map feature#4484
hailaz merged 44 commits intomasterfrom
feat/hash_kvmap

Conversation

@joy999
Copy link
Contributor

@joy999 joy999 commented Oct 18, 2025

add hash kvmap and let other hash map base on it.

@joy999 joy999 added the feature label Oct 18, 2025
@joy999 joy999 requested a review from Copilot October 18, 2025 07:44
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

Introduce a generic KVMap[K,V] and refactor existing typed hash maps to embed and delegate behavior to it, centralizing map logic and reducing duplication.

  • Add generic KVMap[K,V] with common map operations and concurrency control.
  • Refactor StrStrMap, StrIntMap, StrAnyMap, IntStrMap, IntIntMap, IntAnyMap, AnyAnyMap to embed KVMap and forward methods.
  • Add lazyInit helpers in wrappers and unify JSON/Unmarshal/DeepCopy via KVMap.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
container/gmap/gmap_hash_k_v_map.go New generic KVMap[K,V] implementation with map utilities, locking, JSON, deep copy, diff, etc.
container/gmap/gmap_hash_str_str_map.go Refactor to embed KVMap[string,string] and delegate methods; add lazyInit.
container/gmap/gmap_hash_str_int_map.go Refactor to embed KVMap[string,int] and delegate; add lazyInit.
container/gmap/gmap_hash_str_any_map.go Refactor to embed KVMap[string,any] and delegate; add lazyInit.
container/gmap/gmap_hash_int_str_map.go Refactor to embed KVMap[int,string] and delegate; add lazyInit.
container/gmap/gmap_hash_int_int_map.go Refactor to embed KVMap[int,int] and delegate; add lazyInit.
container/gmap/gmap_hash_int_any_map.go Refactor to embed KVMap[int,any] and delegate; add lazyInit.
container/gmap/gmap_hash_any_any_map.go Refactor to embed KVMap[any,any] and delegate; add lazyInit and updated Clone.

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

@joy999 joy999 requested a review from Copilot October 18, 2025 09:43
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

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


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

@joy999 joy999 requested a review from Copilot October 22, 2025 04:59
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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.


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

@joy999 joy999 added the done This issue is done, which may be release in next version. label Oct 22, 2025
@gqcn gqcn changed the title add hash kvmap feat(container/gmap): add generic map Oct 22, 2025
@gqcn gqcn changed the title feat(container/gmap): add generic map feat(container/gmap): add generic map feature Oct 22, 2025
@gqcn gqcn removed the done This issue is done, which may be release in next version. label Oct 22, 2025
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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 22 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hailaz hailaz merged commit 132a5ab into master Nov 28, 2025
20 checks passed
@hailaz hailaz deleted the feat/hash_kvmap branch November 28, 2025 13:41
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