Skip to content

systemd: use sync.WaitGroup.Go in TestParallelConnection - #82

Merged
thaJeztah merged 1 commit into
opencontainers:mainfrom
kolyshkin:wg-go
Oct 3, 2026
Merged

thaJeztah merged 1 commit into
opencontainers:mainfrom
kolyshkin:wg-go

Conversation

@kolyshkin

Copy link
Copy Markdown
Contributor

Now that we require Go 1.25, use the newly added WaitGroup.Go method.

Since Go 1.22, loop variables are per-iteration, so there is no need
to pass dm as an argument to the goroutine.

Neither modernize nor go fix catch this one (because of the goroutine
argument), and this is the only sync.WaitGroup in the repo.

Now that we require Go 1.25, use the newly added WaitGroup.Go method.

Since Go 1.22, loop variables are per-iteration, so there is no need
to pass dm as an argument to the goroutine.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
kolyshkin requested a review from a team as a code owner October 2, 2026 20:29
@kolyshkin
kolyshkin requested a review from thaJeztah October 3, 2026 10:25

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, nice; yes I like this API much more 😂

Wondering why go fix or the modernize linter didn't pick it up here 🤔

LGTM

@thaJeztah
thaJeztah merged commit 5abff79 into opencontainers:main Oct 3, 2026
15 checks passed
@kolyshkin

Copy link
Copy Markdown
Contributor Author

Wondering why go fix or the modernize linter didn't pick it up here 🤔

See this PR description ;)

@thaJeztah

Copy link
Copy Markdown
Member

LOL; I should learn to read 😂 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants