Skip to content

Commit

Permalink
Update response.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadowfaxenator authored Oct 13, 2024
1 parent 9e7dd99 commit 5d3ae0c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions response.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (i *Inertia) prepareProps(r *http.Request, component string, props Props) (

wg:=new(sync.WaitGroup)
errch:=make(chan error,len(result))
defer close(errch)

for key, val := range result {
wg.Add(1)
go func(){
Expand All @@ -228,14 +228,15 @@ func (i *Inertia) prepareProps(r *http.Request, component string, props Props) (

}

Check failure on line 229 in response.go

View workflow job for this annotation

GitHub Actions / audit

unnecessary trailing newline (whitespace)
wg.Wait()
close(errch)
allerr:=make([]error,len(result))
for _, e:= range errch {
for e:= range errch {

Check failure on line 233 in response.go

View workflow job for this annotation

GitHub Actions / audit

unnecessary leading newline (whitespace)

allerr= append(allerr,e)

Check failure on line 235 in response.go

View workflow job for this annotation

GitHub Actions / audit

append to slice `allerr` with non-zero initialized length (makezero)
}
err:=errors.Join(allerr...)
if err!=nil{
return nil, result
return nil, err
}
return result, nil
}
Expand Down

0 comments on commit 5d3ae0c

Please sign in to comment.