We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f57835a commit 77dafd4Copy full SHA for 77dafd4
main.go
@@ -4,10 +4,12 @@ import (
4
"flag"
5
"fmt"
6
"io/ioutil"
7
+ "io/fs"
8
"os"
9
path "path/filepath"
10
"runtime"
11
"strings"
12
+ "errors"
13
14
"github.com/silenceper/log"
15
)
@@ -103,7 +105,7 @@ func main() {
103
105
104
106
// init gowatch.yml
107
if len(os.Args) > 1 && os.Args[1] == "init" {
- if _, err := os.Stat("gowatch.yml"); os.IsNotExist(err) {
108
+ if _, err := os.Stat("gowatch.yml"); errors.Is(err, fs.ErrNotExist) {
109
_ = ioutil.WriteFile("gowatch.yml", []byte(defaultYml), 0755)
110
fmt.Println("gowatch.yml file created to the current directory with the default settings")
111
} else {
0 commit comments