all: modernize code (#868)

Use `go fix ./...` to modernize the code.
This commit is contained in:
Oleksandr Redko 2026-03-31 11:58:02 +03:00 • committed by GitHub
commit a1f808c86e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,7 +5,6 @@
package mcp_test
import (
"context"
"flag"
"log"
"net/http"
@ -51,8 +50,7 @@ func BenchmarkStreamableServing(b *testing.B) {
httpServer := httptest.NewServer(handler)
defer httpServer.Close()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
ctx := b.Context()
session, err := mcp.NewClient(testImpl, nil).Connect(ctx, &mcp.StreamableClientTransport{Endpoint: httpServer.URL}, nil)
if err != nil {
b.Fatal(err)
@ -84,8 +82,7 @@ func BenchmarkStreamableServing_BadSessions(b *testing.B) {
httpServer := httptest.NewServer(handler)
defer httpServer.Close()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
ctx := b.Context()
if *streamableHeap != "" {
writeHeap := func(file string) {