Skip to content

Commit

Permalink
fixed lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sio4 committed Oct 15, 2022
1 parent a1e9e9c commit ba0452c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions filenotify/poller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ func TestPollerEvent(t *testing.T) {
default:
}

if err := ioutil.WriteFile(f.Name(), []byte("hello"), 0644); err != nil {
if err := ioutil.WriteFile(f.Name(), []byte("hello"), 0600); err != nil {
// consider umask
t.Fatal(err)
}
if err := assertEvent(w, fsnotify.Write); err != nil {
t.Fatal(err)
}

if err := os.Chmod(f.Name(), 600); err != nil {
if err := os.Chmod(f.Name(), 0644); err != nil {
t.Fatal(err)
}
if err := assertEvent(w, fsnotify.Chmod); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion refresh/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (w *Watcher) Start() {
err := filepath.Walk(w.AppRoot, func(path string, info os.FileInfo, err error) error {
if info == nil {
w.cancelFunc()
return errors.New("nil directory!")
return errors.New("nil directory")
}
if info.IsDir() {
if strings.HasPrefix(filepath.Base(path), "_") {
Expand Down

0 comments on commit ba0452c

Please sign in to comment.