13 lines
150 B
Go
13 lines
150 B
Go
|
package utils
|
||
|
|
||
|
import "context"
|
||
|
|
||
|
func IsCtxDone(ctx context.Context) bool {
|
||
|
select {
|
||
|
case <-ctx.Done():
|
||
|
return true
|
||
|
default:
|
||
|
return false
|
||
|
}
|
||
|
}
|