diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-06-08 14:19:11 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-06-08 14:58:24 +0900 |
| commit | f869ff95a12756de97827b4afd93763f9661f144 (patch) | |
| tree | 6f5445ae623f44ceb99c8f7ddb5bb4cd1fb04aa0 /test/internal | |
| parent | 725f2e0ef3eaba1ad46b597604a684125ab93911 (diff) | |
all: apply modernisers
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test/internal')
| -rw-r--r-- | test/internal/sandbox/assert.go | 16 |
1 files changed, 8 insertions, 8 deletions
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 { |
