Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 504 Bytes

README.md

File metadata and controls

12 lines (10 loc) · 504 Bytes

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()