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 (
contextType = reflect.TypeOf((*context.Context)(nil)).Elem()
errorType = reflect.TypeOf((*error)(nil)).Elem()
subscriptionType = reflect.TypeOf(Subscription{})
stringType = reflect.TypeOf("")
contextType = reflect.TypeFor[context.Context]()
errorType = reflect.TypeFor[error]()
subscriptionType = reflect.TypeFor[Subscription]()
stringType = reflect.TypeFor[string]()
)
type serviceRegistry struct {