aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata
diff options
context:
space:
mode:
authorDamian Gryski <[email protected]>2022-08-05 13:18:48 -0700
committerRon Evans <[email protected]>2022-08-07 10:32:23 +0200
commita2704f1435c8c26e072f036c32820571498b9052 (patch)
treed55091269813504dbf74d6ed97266b522a18d291 /testdata
parentedbbca5614fc5694d0c631cbcea73c7e2e90b336 (diff)
downloadtinygo-a2704f1435c8c26e072f036c32820571498b9052.tar.gz
tinygo-a2704f1435c8c26e072f036c32820571498b9052.zip
all: move from os.IsFoo to errors.Is(err, ErrFoo)
Diffstat (limited to 'testdata')
-rw-r--r--testdata/filesystem.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/testdata/filesystem.go b/testdata/filesystem.go
index 3825d6187..de7fcbdf8 100644
--- a/testdata/filesystem.go
+++ b/testdata/filesystem.go
@@ -1,13 +1,15 @@
package main
import (
+ "errors"
"io"
+ "io/fs"
"os"
)
func main() {
_, err := os.Open("non-exist")
- if !os.IsNotExist(err) {
+ if !errors.Is(err, fs.ErrNotExist) {
panic("should be non exist error")
}