commit | bdcea2c1b36a391fd43708dcb8bdca48adf3d724 | [log] [tgz] |
---|---|---|
author | Alan Donovan <adonovan@google.com> | Fri Jan 23 14:53:23 2015 -0500 |
committer | Alan Donovan <adonovan@google.com> | Thu Mar 05 20:14:20 2015 +0000 |
tree | aca97e0a22501dc42b200f5e8f1df304015fd747 | |
parent | 9957739054eda1f0e99582dad0d702da8a3d7d66 [diff] |
go/buildutil: use chan (not func) in the ForEachPackage API The callbacks are intentionally concurrent, making this function very easy to misuse (most clients so far have got it wrong, even my own). Using a channel in the API makes the concurrency obvious, the correct usage easy, and the client control flow simpler. Change-Id: Ied38c3ed5c98b40eb1b322a984ed9dc092ac0918 Reviewed-on: https://go-review.googlesource.com/3250 Reviewed-by: Sameer Ajmani <sameer@golang.org>