Skip to content

Commit db8d5cf

Browse files
committed
Fix small gocritic issue
1 parent 181ad1f commit db8d5cf

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

.golangci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ linters:
1111
- forbidigo
1212
- gochecknoglobals
1313
- gochecknoinits
14+
- funlen
1415
- godot
1516
- godox
1617
- lll
@@ -21,9 +22,6 @@ linters:
2122
- nonamedreturns
2223
- varnamelen
2324
- wrapcheck
24-
settings:
25-
funlen:
26-
lines: 90
2725
exclusions:
2826
generated: lax
2927
presets:

cmd/query.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ func queryFluxV2(fluxQuery, url, org, token string, c *http.Client) {
9696
continue
9797
}
9898

99-
//nolint: gocritic
100-
if crit.DoesViolate(recordValue) {
99+
switch {
100+
case crit.DoesViolate(recordValue):
101101
recordStatus = 2
102-
} else if warn.DoesViolate(recordValue) {
102+
case warn.DoesViolate(recordValue):
103103
recordStatus = 1
104-
} else {
104+
default:
105105
recordStatus = 0
106106
}
107107

0 commit comments

Comments
 (0)