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