Sign in
go
/
talks
/
a07c284bcf333dc17a1489fd441e8fccf1e01c2a
/
.
/
content
/
2016
/
applicative
/
google
/
parallel.go
blob: 67434ce5d089a5a0d7a33025b34ef7a5890d9c3b [
file
] [
log
] [
blame
]
package google
func SearchParallel(query string) ([]Result, error) {
c := make(chan Result)
go func() { c <- Web(query) }()
go func() { c <- Image(query) }()
go func() { c <- Video(query) }()
return []Result{<-c, <-c, <-c}, nil
}