Skip to content

Commit c34a969

Browse files
authored
Merge pull request #10 from pablodz/feat/alpine
upgrade version and golang, fix errors.new
2 parents 545d797 + 6ffb96b commit c34a969

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.0.9
1+
v0.0.10

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/pablodz/inotifywaitgo
22

3-
go 1.23.1
3+
go 1.24.1

inotifywaitgo/watcher.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package inotifywaitgo
33
import (
44
"bufio"
55
"encoding/csv"
6+
"errors"
67
"fmt"
78
"log"
89
"os"
@@ -14,13 +15,13 @@ import (
1415
func WatchPath(s *Settings) {
1516
// Check if inotifywait is installed
1617
if ok, err := checkDependencies(); !ok || err != nil {
17-
s.ErrorChan <- fmt.Errorf(NOT_INSTALLED)
18+
s.ErrorChan <- errors.New(NOT_INSTALLED)
1819
return
1920
}
2021

2122
// Check if the directory exists
2223
if _, err := os.Stat(s.Dir); os.IsNotExist(err) {
23-
s.ErrorChan <- fmt.Errorf(DIR_NOT_EXISTS)
24+
s.ErrorChan <- errors.New(DIR_NOT_EXISTS)
2425
return
2526
}
2627

@@ -57,7 +58,7 @@ func WatchPath(s *Settings) {
5758

5859
parts, err := parseLine(line)
5960
if err != nil || len(parts) < 2 {
60-
s.ErrorChan <- fmt.Errorf(INVALID_OUTPUT)
61+
s.ErrorChan <- errors.New(INVALID_OUTPUT)
6162
continue
6263
}
6364

0 commit comments

Comments
 (0)