[go: up one dir, main page]

Skip to content
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

fix defer in a for loop function. #179

Closed
wants to merge 1 commit into from
Closed

fix defer in a for loop function. #179

wants to merge 1 commit into from

Conversation

yanggangtony
Copy link
Contributor

Signed-off-by: yanggang gang.yang@daocloud.io

Do not use defer in a loop unless you’re sure about what you’re doing. It may not work as expected.

#2 — Defer inside a loop

Signed-off-by: yanggang <gang.yang@daocloud.io>
@bobrik
Copy link
Contributor
bobrik commented Jan 19, 2023

Unless you have some specific issue, it does work as expected here.

@yanggangtony
Copy link
Contributor Author

Unless you have some specific issue, it does work as expected here.

Nop..
I just saw it on golang-practise ..
Please feel good to close it..

@bobrik bobrik closed this Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants