Skip to content

Commit 6765515

Browse files
committed
update dependencies
1 parent ff4f7ff commit 6765515

13 files changed

Lines changed: 57 additions & 36 deletions

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ linters:
77
- err113
88
- exhaustruct
99
- funcorder
10+
- goconst
1011
- gochecknoglobals
1112
- gochecknoinits
1213
- godot

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.26.1
55
require (
66
github.com/appscode/g2 v0.0.0-20190123131438-388ba74fd273
77
github.com/consol-monitoring/check_nsc_web v0.7.6
8-
github.com/consol-monitoring/check_prometheus v0.0.0-20260211103550-7975b0b2fb41
8+
github.com/consol-monitoring/check_prometheus v0.0.0-20260508074657-98954417d5ad
99
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
1010
github.com/kdar/factorlog v0.0.0-20211012144011-6ea75a169038
1111
github.com/nsf/termbox-go v1.1.1
@@ -27,7 +27,7 @@ require (
2727
github.com/json-iterator/go v1.1.12 // indirect
2828
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect
2929
github.com/mattn/go-colorable v0.1.14 // indirect
30-
github.com/mattn/go-isatty v0.0.21 // indirect
30+
github.com/mattn/go-isatty v0.0.22 // indirect
3131
github.com/mattn/go-runewidth v0.0.23 // indirect
3232
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
3333
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
@@ -36,9 +36,9 @@ require (
3636
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
3737
github.com/prometheus/common v0.67.5 // indirect
3838
github.com/prometheus/procfs v0.20.1 // indirect
39-
github.com/urfave/cli/v3 v3.8.0 // indirect
39+
github.com/urfave/cli/v3 v3.9.0 // indirect
4040
go.yaml.in/yaml/v2 v2.4.4 // indirect
41-
golang.org/x/sys v0.43.0 // indirect
41+
golang.org/x/sys v0.44.0 // indirect
4242
google.golang.org/protobuf v1.36.11 // indirect
4343
gopkg.in/robfig/cron.v2 v2.0.0-20150107220207-be2e0b0deed5 // indirect
4444
gopkg.in/yaml.v3 v3.0.1 // indirect

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcju
1414
github.com/codeskyblue/go-sh v0.0.0-20200712050446-30169cf553fe/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
1515
github.com/consol-monitoring/check_nsc_web v0.7.6 h1:uhOhHOxIQF9MzHnJBhWztbMPqu4dVvknKHxNHjEeuJI=
1616
github.com/consol-monitoring/check_nsc_web v0.7.6/go.mod h1:9NwVC64JP/I5siKGw9JWubIQCY0vIJ1fNsrXIUChXOo=
17-
github.com/consol-monitoring/check_prometheus v0.0.0-20260211103550-7975b0b2fb41 h1:SBviw8FuSWWGNOShoJNJQu6ebxPtWkAN3rZhU+4sxu8=
18-
github.com/consol-monitoring/check_prometheus v0.0.0-20260211103550-7975b0b2fb41/go.mod h1:9N9L50PJGZXunjkeQF+GF2WODirKIPEBwbuFUg+iX/I=
17+
github.com/consol-monitoring/check_prometheus v0.0.0-20260508074657-98954417d5ad h1:+xJ9rfkzXrdegRNiB50+MkEARRAFblYdTxrU8f70Wyw=
18+
github.com/consol-monitoring/check_prometheus v0.0.0-20260508074657-98954417d5ad/go.mod h1:9N9L50PJGZXunjkeQF+GF2WODirKIPEBwbuFUg+iX/I=
1919
github.com/consol-monitoring/check_x v0.0.0-20260108170459-f7c19720a9ad h1:vf0rv/4E0dT4fc6A8H0hL/U9zUQBJPq2EXLEfwqc+yI=
2020
github.com/consol-monitoring/check_x v0.0.0-20260108170459-f7c19720a9ad/go.mod h1:NVETti6i+ZU5nH7slbTo6Muugvml+0heXX1oswt1FHE=
2121
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -62,8 +62,8 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc
6262
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
6363
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
6464
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
65-
github.com/mattn/go-isatty v0.0.21 h1:xYae+lCNBP7QuW4PUnNG61ffM4hVIfm+zUzDuSzYLGs=
66-
github.com/mattn/go-isatty v0.0.21/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=
65+
github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw4=
66+
github.com/mattn/go-isatty v0.0.22/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=
6767
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
6868
github.com/mattn/go-runewidth v0.0.23 h1:7ykA0T0jkPpzSvMS5i9uoNn2Xy3R383f9HDx3RybWcw=
6969
github.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
@@ -108,8 +108,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
108108
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
109109
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
110110
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
111-
github.com/urfave/cli/v3 v3.8.0 h1:XqKPrm0q4P0q5JpoclYoCAv0/MIvH/jZ2umzuf8pNTI=
112-
github.com/urfave/cli/v3 v3.8.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso=
111+
github.com/urfave/cli/v3 v3.9.0 h1:AV9lIiPv3ukYnxunaCUsHnEozptYmDN2F0+yWqLMn/c=
112+
github.com/urfave/cli/v3 v3.9.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso=
113113
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
114114
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
115115
go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ=
@@ -126,8 +126,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
126126
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
127127
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
128128
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
129-
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
130-
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
129+
golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ=
130+
golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
131131
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
132132
golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
133133
golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY=

pkg/modgearman/check_gearman.go

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,15 @@ func checkWorker(args *checkGmArgs) int {
154154

155155
if !args.SendAsync && args.TextToExpect != "" && res.response != "" {
156156
if strings.Contains(res.response, args.TextToExpect) {
157-
fmt.Fprintf(os.Stdout, "%s OK - send worker: '%s' response: '%s'\n",
157+
fmt.Fprintf(
158+
os.Stdout, "%s OK - send worker: '%s' response: '%s'\n",
158159
pluginName,
159160
args.TextToSend,
160161
res.response,
161162
)
162163
} else {
163-
fmt.Fprintf(os.Stdout, "%s CRITICAL - send worker: '%s' response: '%s', expected '%s'\n",
164+
fmt.Fprintf(
165+
os.Stdout, "%s CRITICAL - send worker: '%s' response: '%s', expected '%s'\n",
164166
pluginName,
165167
args.TextToSend,
166168
res.response,
@@ -278,21 +280,24 @@ func processServerData(queueList []queue, data *serverCheckData, args *checkGmAr
278280
switch {
279281
case element.Waiting > 0 && element.AvailWorker == 0:
280282
data.RC = stateCritical
281-
data.Message = fmt.Sprintf("Queue %s has %d job%s without any worker. ",
283+
data.Message = fmt.Sprintf(
284+
"Queue %s has %d job%s without any worker. ",
282285
element.Name,
283286
element.Waiting,
284287
ternary(element.Waiting > 1, "s", ""),
285288
)
286289
case args.JobCritical > 0 && element.Waiting >= args.JobCritical:
287290
data.RC = stateCritical
288-
data.Message = fmt.Sprintf("Queue %s has %d waiting job%s. ",
291+
data.Message = fmt.Sprintf(
292+
"Queue %s has %d waiting job%s. ",
289293
element.Name,
290294
element.Waiting,
291295
ternary(element.Waiting > 1, "s", ""),
292296
)
293297
case args.WorkerCritical > 0 && element.AvailWorker >= args.WorkerCritical:
294298
data.RC = stateCritical
295-
data.Message = fmt.Sprintf("Queue %s has %d worker. ",
299+
data.Message = fmt.Sprintf(
300+
"Queue %s has %d worker. ",
296301
element.Name,
297302
element.AvailWorker,
298303
)
@@ -301,7 +306,8 @@ func processServerData(queueList []queue, data *serverCheckData, args *checkGmAr
301306
data.Message = fmt.Sprintf("Queue %s has no worker. ", element.Name)
302307
case args.JobWarning > 0 && element.Waiting >= args.JobWarning:
303308
data.RC = stateWarning
304-
data.Message = fmt.Sprintf("Queue %s has %d waiting job%s. ",
309+
data.Message = fmt.Sprintf(
310+
"Queue %s has %d waiting job%s. ",
305311
element.Name,
306312
element.Waiting,
307313
ternary(element.Waiting > 1, "s", ""),
@@ -324,7 +330,8 @@ func printData(data *serverCheckData, queueList []queue, args *checkGmArgs) {
324330
fmt.Fprintf(os.Stdout, "%s ", pluginName)
325331
switch data.RC {
326332
case stateOk:
327-
fmt.Fprintf(os.Stdout, "OK - %d job%s running and %d job%s waiting. Version: %s",
333+
fmt.Fprintf(
334+
os.Stdout, "OK - %d job%s running and %d job%s waiting. Version: %s",
328335
data.TotalRunning,
329336
ternary(data.TotalRunning == 1, "", "s"),
330337
data.TotalWaiting,
@@ -347,7 +354,8 @@ func printData(data *serverCheckData, queueList []queue, args *checkGmArgs) {
347354
if args.Queue != "" && args.Queue != element.Name {
348355
continue
349356
}
350-
fmt.Fprintf(os.Stdout, "'%s_waiting'=%d;%d;%d;0 '%s_running'=%d '%s_worker'=%d;%d;%d;0 ",
357+
fmt.Fprintf(
358+
os.Stdout, "'%s_waiting'=%d;%d;%d;0 '%s_running'=%d '%s_worker'=%d;%d;%d;0 ",
351359
element.Name,
352360
element.Waiting,
353361
args.JobWarning,

pkg/modgearman/decrypt.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ func (r *request) String() string {
5050
r.nextCheck,
5151
r.coreTime,
5252
r.timeout,
53-
r.commandLine)
53+
r.commandLine,
54+
)
5455
}
5556

5657
func createCipher(key []byte, encrypt bool) cipher.Block {

pkg/modgearman/dupserver.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ func enqueueDupServerResult(config *config, result *answer) {
100100
select {
101101
case channel <- &duplicateResult:
102102
default:
103-
log.Debugf("channel is at capacity (%d), dropping message (to dupserver): %s",
103+
log.Debugf(
104+
"channel is at capacity (%d), dropping message (to dupserver): %s",
104105
config.dupServerBacklogQueueSize,
105106
dupAddress,
106107
)

pkg/modgearman/mainWorker.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,8 @@ func (w *mainWorker) checkMemory() (ok bool, reason string) {
417417

418418
usedPercent := 100 - (w.memFree*100)/w.memTotal
419419
if w.cfg.memLimit > 0 && usedPercent >= w.cfg.memLimit {
420-
reason := fmt.Sprintf("cannot start any more worker, memory usage is too high: %d%% > %d%% (free: %s)",
420+
reason := fmt.Sprintf(
421+
"cannot start any more worker, memory usage is too high: %d%% > %d%% (free: %s)",
421422
usedPercent,
422423
w.cfg.memLimit,
423424
bytes2Human(w.memFree*1024),

pkg/modgearman/mod_gearman_worker.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ func mainLoop(cfg *config, osSignalChan chan os.Signal, workerMap map[string]*wo
234234
delta := jobs - lastJobs
235235
seconds := time.Since(statsTime).Seconds()
236236
if seconds > 0 {
237-
log.Infof("stats: workers: %4d/%-4d busy: %4d | jobs: %7d | current job rate: %7.2f/s",
237+
log.Infof(
238+
"stats: workers: %4d/%-4d busy: %4d | jobs: %7d | current job rate: %7.2f/s",
238239
len(mainworker.workerMap),
239240
cfg.maxWorker,
240241
mainworker.activeWorkers,

pkg/modgearman/mod_gearman_worker_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ func BenchmarkJobs(b *testing.B) {
5858

5959
key := getKey(&cfg)
6060
myCipher = createCipher(key, cfg.encryption)
61-
testData := fmt.Sprintf("type=host\nresult_queue=%s\nhost_name=%s\nstart_time=%f\ncore_time=%f\ncommand_line=%s\n",
61+
testData := fmt.Sprintf(
62+
"type=host\nresult_queue=%s\nhost_name=%s\nstart_time=%f\ncore_time=%f\ncommand_line=%s\n",
6263
"results",
6364
"testhost",
6465
float64(time.Now().Unix()),

pkg/modgearman/mod_gearman_worker_unix.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func mainSignalHandler(sig os.Signal, config *config) MainStateType {
4040
if config.flagMemProfile == "" {
4141
log.Errorf("requested memory profile, but flag -memprofile missing")
4242

43-
return (Resume)
43+
return Resume
4444
}
4545
file, err := os.Create(config.flagMemProfile)
4646
if err != nil {
@@ -53,7 +53,7 @@ func mainSignalHandler(sig os.Signal, config *config) MainStateType {
5353
}
5454
log.Warnf("memory profile written to: %s", config.flagMemProfile)
5555

56-
return (Resume)
56+
return Resume
5757
default:
5858
log.Warnf("Signal not handled: %v", sig)
5959
}

0 commit comments

Comments
 (0)