Skip to content

Commit

Permalink
fix Compatible with go1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
silenceper committed Jul 13, 2021
1 parent 1e0797f commit 5e76d35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"flag"
"fmt"
"io/ioutil"
"os"
path "path/filepath"
"runtime"
Expand Down Expand Up @@ -95,7 +96,7 @@ func main() {
// init gowatch.yml
if len(os.Args) > 1 && os.Args[1] == "init" {
if _, err := os.Stat("gowatch.yml"); os.IsNotExist(err) {
_ = os.WriteFile("gowatch.yml", []byte(defaultYml), 0755)
_ = ioutil.WriteFile("gowatch.yml", []byte(defaultYml), 0755)
fmt.Println("gowatch.yml file created to the current directory with the default settings")
} else {
fmt.Println("gowatch.yml has been exists")
Expand Down

0 comments on commit 5e76d35

Please sign in to comment.