all: move from os.IsFoo to errors.Is(err, ErrFoo)

This commit is contained in:
Damian Gryski
2022-08-05 13:18:48 -07:00
committed by Ron Evans
parent edbbca5614
commit a2704f1435
9 changed files with 27 additions and 13 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import (
"bytes"
"errors"
"fmt"
"io/fs"
"os"
"os/exec"
"os/user"
@@ -122,7 +123,7 @@ func findWasmOpt() string {
}
_, err := os.Stat(path)
if err != nil && os.IsNotExist(err) {
if err != nil && errors.Is(err, fs.ErrNotExist) {
continue
}