MCPcopy Create free account
hub / github.com/CPChain/chain / isContextType

Function isContextType

api/rpc/utils.go:58–63  ·  view source on GitHub ↗

isContextType returns an indication if the given t is of context.Context or *context.Context type

(t reflect.Type)

Source from the content-addressed store, hash-verified

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

Callers 1

isPubSubFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected