Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 1.26 KB

README.md

File metadata and controls

49 lines (34 loc) · 1.26 KB

Gomap

codecov Go Report Card Go Reference GitHub

Gomap is a package that contains several functions to make it easier to work with maps in Go.

Installation

go get github.com/dimasadyaksa/gomap

Usage

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.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT