Commit 3024e434 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d41f328d
......@@ -123,10 +123,10 @@ func (mc *mergeCtx) Value(key interface{}) interface{} {
// Cancelled reports whether an error is due to a canceled context.
//
// Since both cancellation - explicit and due to exceeding context deadline -
// result in the same signal to work being done under context, Canceled treats
// both context.Canceled and context.DeadlineExceeded as errors indicating
// context cancellation.
// Since both cancellation ways - explicit and due to exceeding context
// deadline - result in the same signal to work being done under context,
// Canceled treats both context.Canceled and context.DeadlineExceeded as errors
// indicating context cancellation.
func Canceled(err error) bool {
switch err {
case context.Canceled, context.DeadlineExceeded:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment