Skip to content

Instantly share code, notes, and snippets.

@ivancorrales
Last active January 13, 2019 18:55
Show Gist options
  • Save ivancorrales/21aaca018b39c895869ac902ebb745f6 to your computer and use it in GitHub Desktop.
Save ivancorrales/21aaca018b39c895869ac902ebb745f6 to your computer and use it in GitHub Desktop.
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