Skip to content

Commit

Permalink
Change Value type of pair type to Float32
Browse files Browse the repository at this point in the history
  • Loading branch information
hbollon committed Sep 15, 2020
1 parent f2611c4 commit b471431
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions internal/orderedmap/orderedmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions internal/orderedmap/orderedmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
}

Expand Down

0 comments on commit b471431

Please sign in to comment.