rpc: using reflect.TypeFor

This commit is contained in:
cuiweixie 2025-07-31 19:31:01 +08:00
parent d4a3bf1b23
commit 6742365885

View file

@ -29,10 +29,10 @@ import (
) )
var ( var (
contextType = reflect.TypeOf((*context.Context)(nil)).Elem() contextType = reflect.TypeFor[context.Context]()
errorType = reflect.TypeOf((*error)(nil)).Elem() errorType = reflect.TypeFor[error]()
subscriptionType = reflect.TypeOf(Subscription{}) subscriptionType = reflect.TypeFor[Subscription]()
stringType = reflect.TypeOf("") stringType = reflect.TypeFor[string]()
) )
type serviceRegistry struct { type serviceRegistry struct {