File tree 5 files changed +10
-10
lines changed
5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 13
13
steps :
14
14
- uses : actions/checkout@v4
15
15
- name : golangci-lint
16
- uses : golangci/golangci-lint-action@v6
16
+ uses : golangci/golangci-lint-action@v8
17
17
with :
18
18
version : latest
Original file line number Diff line number Diff line change 1
- FROM golang:1.17.8 -alpine3.15 as builder
1
+ FROM golang:1.24.1 -alpine3.21 as builder
2
2
ARG VERSION
3
3
ARG HASH
4
4
Original file line number Diff line number Diff line change 1
1
module github.com/snorwin/haproxy-reload-wrapper
2
2
3
- go 1.21
3
+ go 1.24.1
4
4
5
5
require github.com/fsnotify/fsnotify v1.9.0
6
6
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ func main() {
66
66
select {
67
67
case event := <- fswatch .Events :
68
68
// only care about events which may modify the contents of the directory
69
- if ! ( event .Has (fsnotify .Write ) || event .Has (fsnotify .Remove ) || event .Has (fsnotify .Create ) ) {
69
+ if ! event .Has (fsnotify .Write ) && ! event .Has (fsnotify .Remove ) && ! event .Has (fsnotify .Create ) {
70
70
continue
71
71
}
72
72
Original file line number Diff line number Diff line change @@ -16,30 +16,30 @@ func Command(name string, arg ...string) *Cmd {
16
16
}
17
17
18
18
func (a * Cmd ) AsyncRun () error {
19
- if err := a .Cmd . Start (); err != nil {
19
+ if err := a .Start (); err != nil {
20
20
a .Error = err
21
21
return a .Error
22
22
}
23
- if a .Cmd . Process == nil || a . Cmd .Process .Pid < 1 {
23
+ if a .Process == nil || a .Process .Pid < 1 {
24
24
a .Error = errors .New ("unable to create process" )
25
25
return a .Error
26
26
}
27
27
28
28
go func () {
29
- a .Error = a .Cmd . Wait ()
29
+ a .Error = a .Wait ()
30
30
a .Terminated <- true
31
31
}()
32
32
33
33
return nil
34
34
}
35
35
36
36
func (a * Cmd ) Status () string {
37
- if a .Cmd . Process == nil {
37
+ if a .Process == nil {
38
38
return "not started"
39
39
}
40
40
41
- if a .Cmd . ProcessState != nil {
42
- return a .Cmd . ProcessState .String ()
41
+ if a .ProcessState != nil {
42
+ return a .ProcessState .String ()
43
43
}
44
44
45
45
if a .Error != nil {
You can’t perform that action at this time.
0 commit comments