From a733df2d7b52c1fc1970fcd3016f81bdd5408e17 Mon Sep 17 00:00:00 2001 From: navigaid Date: Sun, 14 Apr 2019 13:28:45 +0800 Subject: [PATCH] fix linkedhashmap.Map comment error In linkedhashmap.go there is a line of comment saying "Map holds the elements in a red-black tree", which is not true. The linkedhashmap holds it's elements in a regular hash table, and uses doubly-linked list to store key ordering. --- maps/linkedhashmap/linkedhashmap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maps/linkedhashmap/linkedhashmap.go b/maps/linkedhashmap/linkedhashmap.go index 02e2391..45c4e35 100644 --- a/maps/linkedhashmap/linkedhashmap.go +++ b/maps/linkedhashmap/linkedhashmap.go @@ -22,7 +22,7 @@ func assertMapImplementation() { var _ maps.Map = (*Map)(nil) } -// Map holds the elements in a red-black tree +// Map holds the elements in a regular hash table, and uses doubly-linked list to store key ordering. type Map struct { table map[interface{}]interface{} ordering *doublylinkedlist.List