-
Notifications
You must be signed in to change notification settings - Fork 18.4k
net: prevent defer misuse in for loops #75035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This PR (HEAD: 24ff1bb) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/696397. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Message from 黄志文: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
This PR (HEAD: 05bd55e) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/696397. Important tips:
|
Message from Jorropo: Patch Set 3: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Message from Go LUCI: Patch Set 3: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-08-15T14:20:19Z","revision":"67f0110676f9d15e3b564db566dd96da574da7d4"} Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Message from Jorropo: Patch Set 3: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Message from Go LUCI: Patch Set 3: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Message from Go LUCI: Patch Set 3: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Message from Damien Neil: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Message from 黄志文: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
This PR (HEAD: 3a40c12) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/696397. Important tips:
|
Message from 黄志文: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Message from Florian Lehner: Patch Set 4: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Message from Damien Neil: Patch Set 4: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Message from Go LUCI: Patch Set 4: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-08-27T17:50:56Z","revision":"3d6275f4c4b4fef8f2274d37b6d09ef66c726b04"} Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Message from XinG XinG: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Message from Damien Neil: Patch Set 4: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Message from Go LUCI: Patch Set 4: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Message from Go LUCI: Patch Set 4: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/696397. |
Previously defer statements were used inside for loops which will lead delayed resource cleanup.