Skip to content

Instantly share code, notes, and snippets.

for {
select {
case <-Ctx.Done():
return
default:
for i := 0; i < 100; i++ {
// 业务逻辑
if err := doSomethingWith(Ctx); err != nil {
log.Error(err)
break