Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
context
for {
select {
case <-Ctx.Done():
return
default:
for i := 0; i < 100; i++ {
// 业务逻辑
if err := doSomethingWith(Ctx); err != nil {
log.Error(err)
break
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment