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

Function isExportedOrBuiltinType

api/rpc/utils.go:46–53  ·  view source on GitHub ↗

Is this type exported or a builtin?

(t reflect.Type)

Source from the content-addressed store, hash-verified

44
45// Is this type exported or a builtin?
46func isExportedOrBuiltinType(t reflect.Type) bool {
47 for t.Kind() == reflect.Ptr {
48 t = t.Elem()
49 }
50 // PkgPath will be non-empty even for an exported type,
51 // so we need to check the type name as well.
52 return isExported(t.Name()) || t.PkgPath() == ""
53}
54
55var contextType = reflect.TypeOf((*context.Context)(nil)).Elem()
56

Callers 1

suitableCallbacksFunction · 0.85

Calls 2

isExportedFunction · 0.85
NameMethod · 0.45

Tested by

no test coverage detected