📝 Update WaitForError comment and add README.md for project documentation.
This commit is contained in:
parent
5df1d9b7c9
commit
4d92c7484d
2 changed files with 105 additions and 1 deletions
|
|
@ -47,7 +47,7 @@ func (we *WaitErr) Go(f func() error) {
|
|||
}
|
||||
|
||||
// WaitForError waits for the first error to be returned by one of our go routines, and immediately returns
|
||||
// with that error. If all functions return successfully, a nil is returned.
|
||||
// with that error. If all functions return successfully, a nil is returned. It will panic if called before Go.
|
||||
func (we *WaitErr) WaitForError() error {
|
||||
if we.errCh == nil {
|
||||
panic("WaitForError called before Go, errCh is nil")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue