November 2017
Intermediate to advanced
670 pages
17h 35m
English
Next, is the immediately executable Goroutine that iterates over the orders that it generates and sends each order to the input of that filter:
go func(){ orders := GetOrders() for _, order := range orders { fmt.Printf("order: %v\n", order) pipeline.Send(*order) } log.Println("Close Pipeline") pipeline.Close() }()
When all of the orders have been sent into the pipeline, it's time to close the pipeline's input channel.