diff options
author | Damian Gryski <[email protected]> | 2022-08-05 13:18:48 -0700 |
---|---|---|
committer | Ron Evans <[email protected]> | 2022-08-07 10:32:23 +0200 |
commit | a2704f1435c8c26e072f036c32820571498b9052 (patch) | |
tree | d55091269813504dbf74d6ed97266b522a18d291 /builder/build.go | |
parent | edbbca5614fc5694d0c631cbcea73c7e2e90b336 (diff) | |
download | tinygo-a2704f1435c8c26e072f036c32820571498b9052.tar.gz tinygo-a2704f1435c8c26e072f036c32820571498b9052.zip |
all: move from os.IsFoo to errors.Is(err, ErrFoo)
Diffstat (limited to 'builder/build.go')
-rw-r--r-- | builder/build.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builder/build.go b/builder/build.go index d5d7a242c..c6d0ff267 100644 --- a/builder/build.go +++ b/builder/build.go @@ -14,6 +14,7 @@ import ( "fmt" "go/types" "hash/crc32" + "io/fs" "math/bits" "os" "os/exec" @@ -147,7 +148,7 @@ func Build(pkgName, outpath string, config *compileopts.Config, action func(Buil libcDependencies = append(libcDependencies, libcJob) case "wasi-libc": path := filepath.Join(root, "lib/wasi-libc/sysroot/lib/wasm32-wasi/libc.a") - if _, err := os.Stat(path); os.IsNotExist(err) { + if _, err := os.Stat(path); errors.Is(err, fs.ErrNotExist) { return errors.New("could not find wasi-libc, perhaps you need to run `make wasi-libc`?") } libcDependencies = append(libcDependencies, dummyCompileJob(path)) |