Documentation ¶ Index ¶ type Group func (g *Group) Add(fn func(<-chan struct{})) func (g *Group) Run() Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Group ¶ type Group struct { // contains filtered or unexported fields } Group manages a set of goroutines with related lifetimes. func (*Group) Add ¶ func (g *Group) Add(fn func(<-chan struct{})) Add adds a function to the Group. Must be called before Run. func (*Group) Run ¶ func (g *Group) Run() Run exectues each function registered with Add in its own goroutine. Run blocks until each function has returned. The first function to return will trigger the closure of the channel passed to each function, who should in turn, return. Source Files ¶ View all Source files workgroup.go Click to show internal directories. Click to hide internal directories.