Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
number571 committed Dec 6, 2024
1 parent 2167870 commit 88c7d2a
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 126 deletions.
9 changes: 2 additions & 7 deletions pkg/anonymity/anonymity.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (p *sNode) Run(pCtx context.Context) error {

const N = 3

errs := [N]error{}
errs := make([]error, N)
wg := &sync.WaitGroup{}
wg.Add(N)

Expand All @@ -93,12 +93,7 @@ func (p *sNode) Run(pCtx context.Context) error {
case <-pCtx.Done():
return pCtx.Err()
default:
for _, err := range errs {
if err != nil {
return err
}
}
panic("closed without errors")
return errors.Join(errs...)
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/result/badge_codelines.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 88c7d2a

Please sign in to comment.