You can do ruby-like array operations in the golang.😎
https://docs.ruby-lang.org/ja/latest/class/Array.html
$ go install github.com/ppmasa8/[email protected]
- Pop
- Shift
- Push
- Unshift
- Delete
- Sum
- Max
- Min
- Size
- Uniq
- Include
- First
- Last
coming soon....
package main
import (
"fmt"
"github.com/ppmasa8/rbarray"
)
func main() {
array := rbarray.Array{IntVals: rbarray.IntArray{1, 3, 5}}
fmt.Println(array.Pop())
// output
// 5
}