feat(container/glist): add generic list feature#4483
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a generic doubly linked list implementation TList[T] to the glist package, with supporting tests, examples, and benchmarks.
- Adds a new generic list implementation with concurrency support and JSON/deep copy utilities.
- Provides extensive unit tests, examples, and benchmarks for TList[T].
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 18 comments.
| File | Description |
|---|---|
| container/glist/glist_t.go | New generic TList[T] implementation with API similar to existing List, plus JSON, deepcopy, iterators, and concurrency controls. |
| container/glist/glist_z_unit_t_test.go | Unit tests covering core operations, iterators, JSON, and deep copy for TList[any]. |
| container/glist/glist_z_example_t_test.go | Example usage for TList[T] APIs. |
| container/glist/glist_z_bench_t_test.go | Benchmarks for concurrent push/pop/len operations on TList[any]. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This reverts commit 98b3059.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 13 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This reverts commit c3fae3c.
It is wrote with glist.List's and list.List's source codes and improve to support T type.