isContextType returns an indication if the given t is of context.Context or *context.Context type
(t reflect.Type)
| 56 | |
| 57 | // isContextType returns an indication if the given t is of context.Context or *context.Context type |
| 58 | func isContextType(t reflect.Type) bool { |
| 59 | for t.Kind() == reflect.Ptr { |
| 60 | t = t.Elem() |
| 61 | } |
| 62 | return t == contextType |
| 63 | } |
| 64 | |
| 65 | var errorType = reflect.TypeOf((*error)(nil)).Elem() |
| 66 |