vitorsalgado / go-generics-playground

Go Arrays. Playing With Go Generics.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Arrays · [Generics Playground] · ci

Simple utility to handle arrays in similar way to JavaScript arrays API.
Developed to learn Go Generics.

Usage

s := Of([]string{"1", "2", "3"}).
    Map(func(i string) string { return fmt.Sprintf("%s-test", i) }).
    Filter(func(i string) bool { return strings.Contains(i, "1") }).
    Collect()

About

Go Arrays. Playing With Go Generics.

License:MIT License


Languages

Language:Go 100.0%