Skip to content

Commit

Permalink
Merge pull request #21 from EscanBE/fix/get-map-values-now-values-any
Browse files Browse the repository at this point in the history
imp: map util GetMapValues now accept non-comparable type
  • Loading branch information
VictorTrustyDev authored Aug 13, 2023
2 parents f8959a0 + 65d5f07 commit 13dcafa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/map_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func GetKeysOf[K, V comparable](myMap map[K]V, expectedValue V) []K {
}

// GetMapValues returns slide of all values of the map
func GetMapValues[K, V comparable](myMap map[K]V) []V {
func GetMapValues[K comparable, V any](myMap map[K]V) []V {
values := make([]V, len(myMap))
cnt := 0
for _, value := range myMap {
Expand Down

0 comments on commit 13dcafa

Please sign in to comment.