func TypeOf(goType reflect.Type) *Type {
	if goType == nil {
		return nil
	}
	typeMutex.RLock()
	t := typesByGoType[goType]
	typeMutex.RUnlock()
	if t != nil {
		return t
	}
	typeMutex.Lock()
	defer typeMutex.Unlock()
	t = typesByGoType[goType]
	if t != nil {
		return t
	}
	t = typeOf(goType)
	typesByGoType[goType] = t
	return t
}
// TypeOf returns information on all root-level RPC methods
// implemented by an object of the given Go type.
// If goType is nil, it returns nil.
TypeOf returns information on all root-level RPC methods
implemented by an object of the given Go type.
If goType is nil, it returns nil.
// TypeOf returns information on all root - level RPC methods // implemented by an object of the given Go type . // If goType is nil it returns nil .
func TypeOf(goType reflect.Type) *Type {
	if goType == nil {
		return nil
	}
	typeMutex.RLock()
	t := typesByGoType[goType]
	typeMutex.RUnlock()
	if t != nil {
		return t
	}
	typeMutex.Lock()
	defer typeMutex.Unlock()
	t = typesByGoType[goType]
	if t != nil {
		return t
	}
	t = typeOf(goType)
	typesByGoType[goType] = t
	return t
}
func TypeOf ( goType reflect . Type ) * Type { if goType == nil { return nil } typeMutex . RLock ( ) t := typesByGoType [ goType ] typeMutex . RUnlock ( ) if t != nil { return t } typeMutex . Lock ( ) defer typeMutex . Unlock ( ) t = typesByGoType [ goType ] if t != nil { return t } t = typeOf ( goType ) typesByGoType [ goType ] = t return t }
TypeOf returns information on all root-level RPC methods
implemented by an object of the given Go type.
TypeOf returns information on all root - level RPC methods implemented by an object of the given Go type .