mirror of
https://github.com/HChaZZY/alist.git
synced 2025-12-06 11:03:49 +08:00
feat: add copy to task manager
This commit is contained in:
12
pkg/utils/ctx.go
Normal file
12
pkg/utils/ctx.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package utils
|
||||
|
||||
import "context"
|
||||
|
||||
func IsCanceled(ctx context.Context) bool {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user