aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/container.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-06-08 14:19:11 +0900
committerOphestra <cat@gensokyo.uk>2026-06-08 14:58:24 +0900
commitf869ff95a12756de97827b4afd93763f9661f144 (patch)
tree6f5445ae623f44ceb99c8f7ddb5bb4cd1fb04aa0 /container/container.go
parent725f2e0ef3eaba1ad46b597604a684125ab93911 (diff)
all: apply modernisers
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/container.go')
-rw-r--r--container/container.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/container/container.go b/container/container.go
index 8af77315..3571d04a 100644
--- a/container/container.go
+++ b/container/container.go
@@ -154,11 +154,8 @@ func (e *StartError) Error() string {
return e.Step
}
- {
- var syscallError *os.SyscallError
- if errors.As(e.Err, &syscallError) && syscallError != nil {
- return e.Step + " " + syscallError.Error()
- }
+ if se, ok := errors.AsType[*os.SyscallError](e.Err); ok && se != nil {
+ return e.Step + " " + se.Error()
}
return e.Step + ": " + e.Err.Error()