context17_test.go 402 B

123456789101112131415
  1. // +build !go1.8
  2. // Copyright (c) 2015-2019 Jeevanandam M (jeeva@myjeeva.com)
  3. // 2016 Andrew Grigorev (https://github.com/ei-grad)
  4. // All rights reserved.
  5. // resty source code and usage is governed by a MIT style
  6. // license that can be found in the LICENSE file.
  7. package resty
  8. import "strings"
  9. func errIsContextCanceled(err error) bool {
  10. return strings.Contains(err.Error(), "request canceled")
  11. }