feat: add copy to task manager

This commit is contained in:
Noah Hsu
2022-06-17 21:23:44 +08:00
parent 53e969e894
commit fa6e918fc7
10 changed files with 143 additions and 70 deletions

12
pkg/utils/ctx.go Normal file
View File

@ -0,0 +1,12 @@
package utils
import "context"
func IsCanceled(ctx context.Context) bool {
select {
case <-ctx.Done():
return true
default:
return false
}
}