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 /hst/fs_test.go | |
| parent | 725f2e0ef3eaba1ad46b597604a684125ab93911 (diff) | |
all: apply modernisers
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst/fs_test.go')
| -rw-r--r-- | hst/fs_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hst/fs_test.go b/hst/fs_test.go index 94d44078..a88970b7 100644 --- a/hst/fs_test.go +++ b/hst/fs_test.go @@ -103,7 +103,7 @@ func TestFilesystemConfigJSON(t *testing.T) { t.Run("marshal", func(t *testing.T) { t.Parallel() wantErr := tc.wantErr - if errors.As(wantErr, new(hst.FSTypeError)) { + if _, ok := errors.AsType[hst.FSTypeError](wantErr); ok { // for unsupported implementation tc wantErr = hst.FSImplError{Value: stubFS{"cat"}} } @@ -139,7 +139,7 @@ func TestFilesystemConfigJSON(t *testing.T) { t.Run("unmarshal", func(t *testing.T) { t.Parallel() if tc.data == "\x00" && tc.sData == "\x00" { - if errors.As(tc.wantErr, new(hst.FSImplError)) { + if _, ok := errors.AsType[hst.FSImplError](tc.wantErr); ok { // this error is only returned on marshal return } |
