📝 Update WaitForError comment and add README.md for project documentation.

This commit is contained in:
Dan Jones 2025-11-13 14:53:54 -06:00
commit 4d92c7484d
2 changed files with 105 additions and 1 deletions

View file

@ -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")