From d49f548618c3001143b1d5d3eb6b6425937720d0 Mon Sep 17 00:00:00 2001 From: Dan Jones Date: Thu, 13 Nov 2025 15:37:23 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Update=20comments=20in=20waiterr?= =?UTF-8?q?.go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- waiterr.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/waiterr.go b/waiterr.go index 156da4a..0ba8821 100644 --- a/waiterr.go +++ b/waiterr.go @@ -5,7 +5,7 @@ import ( "sync" ) -// WaitErr wraps a sync.WaitGroup with error handling. +// WaitErr wraps a [sync.WaitGroup] with error handling. type WaitErr struct { wg sync.WaitGroup errs []error @@ -17,7 +17,7 @@ type WaitErr struct { } // Go runs f in its own goroutine. When f returns, its error is stored, and returned -// with we.Wait(). +// with [WaitErr.Wait]. func (we *WaitErr) Go(f func() error) { we.initErrChOnce.Do(func() { we.errCh = make(chan error, 1) @@ -90,7 +90,7 @@ func (we *WaitErr) Wait() error { } // Unwrap returns all non-nil errors returned by our functions. -// If we.errs is empty, or all errors are nil, just return nil. +// If no errors were returned, or all errors are nil, it returns nil. func (we *WaitErr) Unwrap() []error { errs := make([]error, 0, len(we.errs)) for _, e := range we.errs {