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

@ -200,8 +200,7 @@ func TestStdioContextCancellation(t *testing.T) {
func TestCmdTransport(t *testing.T) {
requireExec(t)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
ctx := t.Context()
cmd := createServerCommand(t, "default")
@ -287,8 +286,7 @@ func TestCommandTransportTerminateDuration(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
ctx := t.Context()
// Use a command that won't exit when stdin is closed
cmd := exec.Command("sleep", "20")