Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alist-org
GitHub Repository: alist-org/alist
Path: blob/main/pkg/utils/ctx.go
1560 views
1
package utils
2
3
import (
4
"context"
5
)
6
7
func IsCanceled(ctx context.Context) bool {
8
select {
9
case <-ctx.Done():
10
return true
11
default:
12
return false
13
}
14
}
15
16