Skip to content

Commit abbd56a

Browse files
committed
WIP13
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
1 parent 7d674aa commit abbd56a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func CancelHandler(handler jsonrpc2.Handler) jsonrpc2.Handler {
2222
// be careful about racing between the two paths.
2323
// TODO(iancottrell): Add a test that watches the stream and verifies the response
2424
// for the cancelled request flows.
25-
reply := func(ctx context.Context, resp interface{}, err error) error {
25+
reply := func(ctx context.Context, resp any, err error) error {
2626
// https://microsoft.github.io/language-server-protocol/specifications/specification-current/#cancelRequest
2727
if ctx.Err() != nil && err == nil {
2828
err = ErrRequestCancelled
@@ -65,7 +65,7 @@ func Handlers(handler jsonrpc2.Handler) jsonrpc2.Handler {
6565
}
6666

6767
// Call calls method to params and result.
68-
func Call(ctx context.Context, conn jsonrpc2.Conn, method string, params, result interface{}) error {
68+
func Call(ctx context.Context, conn jsonrpc2.Conn, method string, params, result any) error {
6969
_, err := conn.Call(ctx, method, params, result)
7070
if ctx.Err() != nil {
7171
}

protocol/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func Handlers(handler jsonrpc2.Handler) jsonrpc2.Handler {
1818
}
1919

2020
// Call calls method to params and result.
21-
func Call(ctx context.Context, conn jsonrpc2.Conn, method string, params, result interface{}) error {
21+
func Call(ctx context.Context, conn jsonrpc2.Conn, method string, params, result any) error {
2222
_, err := conn.Call(ctx, method, params, result)
2323
if ctx.Err() != nil {
2424
}

0 commit comments

Comments
 (0)