Last active
January 13, 2019 18:55
-
-
Save ivancorrales/21aaca018b39c895869ac902ebb745f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/wesovilabs/koazee" | |
"koazee-examples-v2/model" | |
) | |
func main() { | |
fmt.Println("Print the title of albums provided by 'Columbia Records'") | |
koazee.StreamOf(model.Albums). | |
Filter(func(a *model.Album) bool { | |
return a.Label == "Columbia Records" | |
}).ForEach(func(a *model.Album) { | |
fmt.Printf(" - %s\n", a.Title) | |
}).Do() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment