internal/jsonrpc2,mcp: fix typos (#183)

- add links to doc strings
- use correct symbol and package names
This commit is contained in:
Koichi Shiraishi 2025-07-29 01:18:03 +09:00 • committed by GitHub
commit 619bc41581
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,7 +44,7 @@ type MethodHandler[S Session] func(ctx context.Context, _ S, method string, para
// the compiler would complain.
type methodHandler any // MethodHandler[*ClientSession] | MethodHandler[*ServerSession]
// A Session is either a ClientSession or a ServerSession.
// A Session is either a [ClientSession] or a [ServerSession].
type Session interface {
*ClientSession | *ServerSession
// ID returns the session ID, or the empty string if there is none.
@ -57,7 +57,7 @@ type Session interface {
getConn() *jsonrpc2.Connection
}
// Middleware is a function from MethodHandlers to MethodHandlers.
// Middleware is a function from [MethodHandler] to [MethodHandler].
type Middleware[S Session] func(MethodHandler[S]) MethodHandler[S]
// addMiddleware wraps the handler in the middleware functions.