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

.

parent d41f328d
...@@ -123,10 +123,10 @@ func (mc *mergeCtx) Value(key interface{}) interface{} { ...@@ -123,10 +123,10 @@ func (mc *mergeCtx) Value(key interface{}) interface{} {
// Cancelled reports whether an error is due to a canceled context. // Cancelled reports whether an error is due to a canceled context.
// //
// Since both cancellation - explicit and due to exceeding context deadline - // Since both cancellation ways - explicit and due to exceeding context
// result in the same signal to work being done under context, Canceled treats // deadline - result in the same signal to work being done under context,
// both context.Canceled and context.DeadlineExceeded as errors indicating // Canceled treats both context.Canceled and context.DeadlineExceeded as errors
// context cancellation. // indicating context cancellation.
func Canceled(err error) bool { func Canceled(err error) bool {
switch err { switch err {
case context.Canceled, context.DeadlineExceeded: 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