This package is provided to be used on golang and it gives clean methods to handle arrays.
- Golang 1.12.x: keep your compiler up to date :)
- reflect
The package is in process.
Run this commands
$ go get github.com/MrJoshLab/go-collection
You must to import the package name
import (
collection "github.com/MrJoshLab/go-collection"
)
You also need fmt package to print results in console
import "fmt"
The following illustrates how you can use Array type or function to use methods.
data := map[string] string { "say": "hello" }
c := collection.New(data)
// example:
fmt.Println(c.Has("say"))
// return true
fmt.Println(c.Get("say"))
// return "hello"
The MIT License (MIT). Please see License File for more information.