From 459c69839a2c64850ad09eecea5c10356d2cb30a Mon Sep 17 00:00:00 2001 From: John Date: Sat, 30 Nov 2019 18:28:11 +0800 Subject: [PATCH] comment update for container --- .example/container/gmap/gmap_map_clone_safe.go | 2 +- container/gmap/gmap.go | 4 ++-- container/gmap/gmap_tree_map.go | 4 ++-- container/gset/gset_any_set.go | 2 +- container/gset/gset_int_set.go | 2 +- container/gset/gset_str_set.go | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.example/container/gmap/gmap_map_clone_safe.go b/.example/container/gmap/gmap_map_clone_safe.go index 46bd1051f..95a8662d5 100644 --- a/.example/container/gmap/gmap_map_clone_safe.go +++ b/.example/container/gmap/gmap_map_clone_safe.go @@ -6,7 +6,7 @@ import ( ) func main() { - m1 := gmap.New() + m1 := gmap.New(true) m1.Set("1", "1") m2 := m1.Map() diff --git a/container/gmap/gmap.go b/container/gmap/gmap.go index 50fd76830..5d1cec522 100644 --- a/container/gmap/gmap.go +++ b/container/gmap/gmap.go @@ -21,7 +21,7 @@ func New(safe ...bool) *Map { // NewFrom returns a hash map from given map . // Note that, the param map will be set as the underlying data map(no deep copy), // there might be some concurrent-safe issues when changing the map outside. -// The parameter used to specify whether using tree in un-concurrent-safety, +// The parameter used to specify whether using tree in concurrent-safety, // which is false in default. func NewFrom(data map[interface{}]interface{}, safe ...bool) *Map { return NewAnyAnyMapFrom(data, safe...) @@ -37,7 +37,7 @@ func NewHashMap(safe ...bool) *Map { // NewHashMapFrom returns a hash map from given map . // Note that, the param map will be set as the underlying data map(no deep copy), // there might be some concurrent-safe issues when changing the map outside. -// The parameter used to specify whether using tree in un-concurrent-safety, +// The parameter used to specify whether using tree in concurrent-safety, // which is false in default. func NewHashMapFrom(data map[interface{}]interface{}, safe ...bool) *Map { return NewAnyAnyMapFrom(data, safe...) diff --git a/container/gmap/gmap_tree_map.go b/container/gmap/gmap_tree_map.go index 0e696e802..1c7b3d36b 100644 --- a/container/gmap/gmap_tree_map.go +++ b/container/gmap/gmap_tree_map.go @@ -14,7 +14,7 @@ import ( type TreeMap = gtree.RedBlackTree // NewTreeMap instantiates a tree map with the custom comparator. -// The parameter used to specify whether using tree in un-concurrent-safety, +// The parameter used to specify whether using tree in concurrent-safety, // which is false in default. func NewTreeMap(comparator func(v1, v2 interface{}) int, safe ...bool) *TreeMap { return gtree.NewRedBlackTree(comparator, safe...) @@ -23,7 +23,7 @@ func NewTreeMap(comparator func(v1, v2 interface{}) int, safe ...bool) *TreeMap // NewTreeMapFrom instantiates a tree map with the custom comparator and map. // Note that, the param map will be set as the underlying data map(no deep copy), // there might be some concurrent-safe issues when changing the map outside. -// The parameter used to specify whether using tree in un-concurrent-safety, +// The parameter used to specify whether using tree in concurrent-safety, // which is false in default. func NewTreeMapFrom(comparator func(v1, v2 interface{}) int, data map[interface{}]interface{}, safe ...bool) *TreeMap { return gtree.NewRedBlackTreeFrom(comparator, data, safe...) diff --git a/container/gset/gset_any_set.go b/container/gset/gset_any_set.go index 167d958b7..88883259d 100644 --- a/container/gset/gset_any_set.go +++ b/container/gset/gset_any_set.go @@ -21,7 +21,7 @@ type Set struct { } // New create and returns a new set, which contains un-repeated items. -// The parameter used to specify whether using set in un-concurrent-safety, +// The parameter used to specify whether using set in concurrent-safety, // which is false in default. func New(safe ...bool) *Set { return NewSet(safe...) diff --git a/container/gset/gset_int_set.go b/container/gset/gset_int_set.go index ab8bb8856..457fca8c1 100644 --- a/container/gset/gset_int_set.go +++ b/container/gset/gset_int_set.go @@ -20,7 +20,7 @@ type IntSet struct { } // New create and returns a new set, which contains un-repeated items. -// The parameter used to specify whether using set in un-concurrent-safety, +// The parameter used to specify whether using set in concurrent-safety, // which is false in default. func NewIntSet(safe ...bool) *IntSet { return &IntSet{ diff --git a/container/gset/gset_str_set.go b/container/gset/gset_str_set.go index 472765fca..a8c41269d 100644 --- a/container/gset/gset_str_set.go +++ b/container/gset/gset_str_set.go @@ -21,7 +21,7 @@ type StrSet struct { } // New create and returns a new set, which contains un-repeated items. -// The parameter used to specify whether using set in un-concurrent-safety, +// The parameter used to specify whether using set in concurrent-safety, // which is false in default. func NewStrSet(safe ...bool) *StrSet { return &StrSet{