From cdac4ce1cf55d8cdf6c71d83972d56ea9ee71b0a Mon Sep 17 00:00:00 2001 From: conneroisu Date: Thu, 8 Aug 2024 12:46:28 -0400 Subject: [PATCH] fix parallel access --- slices.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/slices.go b/slices.go index 700cc7f3..c2c15dbc 100644 --- a/slices.go +++ b/slices.go @@ -663,9 +663,13 @@ func NewPl[T any](doc *goquery.Document) ([]T, error) { err, ) } + errCh <- nil } }(i) } + for i := 0; i < dType.NumField(); i++ { + <-errCh + } if len(results) < 1 { return nil, fmt.Errorf("no data found") }