rpc: use reflect.TypeFor #32316 (#1410)

Co-authored-by: cui <cuiweixie@gmail.com>
This commit is contained in:
Daniel Liu 2025-09-03 15:42:31 +08:00 committed by GitHub
parent 2d36f159c7
commit 33b40aef2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 {