From 0b9c4c3777352ccf610d47ea801e0b37230de9f3 Mon Sep 17 00:00:00 2001 From: zhangrangding Date: Sun, 26 May 2024 17:14:23 +0800 Subject: [PATCH] fix: adapt comments for generics, interface{} -> T --- lists/lists.go | 2 +- maps/maps.go | 2 +- queues/queues.go | 2 +- sets/sets.go | 2 +- stacks/stacks.go | 2 +- trees/trees.go | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lists/lists.go b/lists/lists.go index cc310366..0b371131 100644 --- a/lists/lists.go +++ b/lists/lists.go @@ -29,6 +29,6 @@ type List[T comparable] interface { // Empty() bool // Size() int // Clear() - // Values() []interface{} + // Values() []T // String() string } diff --git a/maps/maps.go b/maps/maps.go index b54f7dc5..6a108991 100644 --- a/maps/maps.go +++ b/maps/maps.go @@ -28,7 +28,7 @@ type Map[K comparable, V any] interface { // Empty() bool // Size() int // Clear() - // Values() []interface{} + // Values() []T // String() string } diff --git a/queues/queues.go b/queues/queues.go index 6f2deb43..c653b516 100644 --- a/queues/queues.go +++ b/queues/queues.go @@ -22,6 +22,6 @@ type Queue[T comparable] interface { // Empty() bool // Size() int // Clear() - // Values() []interface{} + // Values() []T // String() string } diff --git a/sets/sets.go b/sets/sets.go index e63bb5fe..d884422e 100644 --- a/sets/sets.go +++ b/sets/sets.go @@ -23,6 +23,6 @@ type Set[T comparable] interface { // Empty() bool // Size() int // Clear() - // Values() []interface{} + // Values() []T // String() string } diff --git a/stacks/stacks.go b/stacks/stacks.go index 4acd0116..de1ed909 100644 --- a/stacks/stacks.go +++ b/stacks/stacks.go @@ -21,6 +21,6 @@ type Stack[T any] interface { // Empty() bool // Size() int // Clear() - // Values() []interface{} + // Values() []T // String() string } diff --git a/trees/trees.go b/trees/trees.go index ad544007..33795399 100644 --- a/trees/trees.go +++ b/trees/trees.go @@ -12,11 +12,11 @@ package trees import "github.com/emirpasic/gods/v2/containers" // Tree interface that all trees implement -type Tree[V any] interface { - containers.Container[V] +type Tree[T any] interface { + containers.Container[T] // Empty() bool // Size() int // Clear() - // Values() []interface{} + // Values() []T // String() string }