diff --git a/internal/orderedmap/orderedmap.go b/internal/orderedmap/orderedmap.go index 15e2ec0..0b3009d 100644 --- a/internal/orderedmap/orderedmap.go +++ b/internal/orderedmap/orderedmap.go @@ -6,10 +6,10 @@ import ( type pair struct { Key string - Value int + Value float32 } -// OrderedMap is a map like type with string keys and int values. +// OrderedMap is a slice of pairs type with string keys and float values. // It implement sorting methods by values. type OrderedMap []pair diff --git a/internal/orderedmap/orderedmap_test.go b/internal/orderedmap/orderedmap_test.go index a178c9e..7efb6f9 100644 --- a/internal/orderedmap/orderedmap_test.go +++ b/internal/orderedmap/orderedmap_test.go @@ -9,11 +9,11 @@ var testOrderedMap OrderedMap func init() { testOrderedMap = OrderedMap{ - {"test1", 5}, - {"test2", 2}, - {"test3", 4}, - {"test4", 3}, - {"test5", 6}, + {"test1", 5.0}, + {"test2", 2.0}, + {"test3", 4.0}, + {"test4", 3.0}, + {"test5", 6.0}, } }