Gomap is a package that contains several functions to make it easier to work with maps in Go.
go get github.com/dimasadyaksa/gomap
package main
import (
"fmt"
"github.com/dimasadyaksa/gomap"
)
func main(){
m := map[string]int{
"a": 1,
"b": 2,
"c": 3,
}
keys := gomap.Keys(m)
fmt.Println(keys) // [a b c]
values := gomap.Values(m)
fmt.Println(values) // [1 2 3]
}
Please refer to the examples directory for more usage examples.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.