From f869ff95a12756de97827b4afd93763f9661f144 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 8 Jun 2026 14:19:11 +0900 Subject: all: apply modernisers Signed-off-by: Ophestra --- test/internal/sandbox/assert.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/internal/sandbox/assert.go b/test/internal/sandbox/assert.go index 343c1586..e6fe926b 100644 --- a/test/internal/sandbox/assert.go +++ b/test/internal/sandbox/assert.go @@ -1,11 +1,11 @@ //go:build testtool -/* -Package sandbox provides utilities for checking sandbox outcome. - -This package must never be used outside integration tests, there is a much better native implementation of mountinfo -in the public sandbox/vfs package. Files in this package are excluded by the build system to prevent accidental misuse. -*/ +// Package sandbox provides utilities for checking sandbox outcome. +// +// This package must never be used outside integration tests, there is a much +// better native implementation of mountinfo in the public sandbox/vfs package. +// Files in this package are excluded by the build system to prevent accidental +// misuse. package sandbox import ( @@ -204,8 +204,8 @@ func MustCheckFilter(pid int, want string) { return } - var perr *ptraceError - if !errors.As(err, &perr) { + perr, ok := errors.AsType[*ptraceError](err) + if !ok { fatalf("%s", err) } switch perr.op { -- cgit v1.3.1