Spaces:
Runtime error
Runtime error
package utils | |
import ( | |
"context" | |
) | |
func IsCanceled(ctx context.Context) bool { | |
select { | |
case <-ctx.Done(): | |
return true | |
default: | |
return false | |
} | |
} | |