We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f896659 commit 64939f6Copy full SHA for 64939f6
src/net/rpc/server.go
@@ -146,9 +146,8 @@ const (
146
DefaultDebugPath = "/debug/rpc"
147
)
148
149
-// Precompute the reflect type for error. Can't use error directly
150
-// because Typeof takes an empty interface value. This is annoying.
151
-var typeOfError = reflect.TypeOf((*error)(nil)).Elem()
+// Precompute the reflect type for error.
+var typeOfError = reflect.TypeFor[error]()
152
153
type methodType struct {
154
sync.Mutex // protects counters
0 commit comments