rpc: use reflect.TypeFor (#32316)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run

This commit is contained in:
cui 2025-08-07 20:15:54 +08:00 committed by GitHub
parent e7189b5987
commit f49f3ec780
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 {