mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 21:43:40 +00:00
all: move from os.IsFoo to errors.Is(err, ErrFoo)
This commit is contained in:
@@ -10,8 +10,10 @@ package testing
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -277,7 +279,7 @@ func (c *common) TempDir() string {
|
||||
nonExistent = true
|
||||
} else {
|
||||
_, err := os.Stat(c.tempDir)
|
||||
nonExistent = os.IsNotExist(err)
|
||||
nonExistent = errors.Is(err, fs.ErrNotExist)
|
||||
if err != nil && !nonExistent {
|
||||
c.Fatalf("TempDir: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user