Skip to content

Commit 993f686

Browse files
committed
Fix lint warn
1 parent 5315887 commit 993f686

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

.gostyle.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
analyzers:
22
disable:
33
- mixedcaps # disable mixedcaps analyzer. because the underscores analyzer is more detailed.
4+
- handlerrors
5+
- funcfmt
6+
- dontpanic
47
analyzers-settings:
58
ifacenames:
69
all: true # all interface names with the -er suffix are required (default: false)

cdp.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323

2424
type cdpRunner struct {
2525
name string
26-
ctx context.Context
26+
ctx context.Context //nostyle:contexts
2727
cancel context.CancelFunc
2828
store map[string]any
2929
operator *operator

loop_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -54,33 +54,33 @@ func TestNewLoop(t *testing.T) {
5454
t.Fatal(err)
5555
}
5656
if diff := cmp.Diff(got.Count, tt.count, nil); diff != "" {
57-
t.Errorf("Count: %s", diff)
57+
t.Errorf("count: %s", diff)
5858
}
5959
if got.Interval != "" {
6060
if diff := cmp.Diff(got.Interval, tt.interval, nil); diff != "" {
61-
t.Errorf("Interval: %s", diff)
61+
t.Errorf("interval: %s", diff)
6262
}
6363
}
6464
if got.MinInterval != "" {
6565
if diff := cmp.Diff(got.MinInterval, tt.minInterval, nil); diff != "" {
66-
t.Errorf("MinInterval: %s", diff)
66+
t.Errorf("minInterval: %s", diff)
6767
}
6868
}
6969
if got.MaxInterval != "" {
7070
if diff := cmp.Diff(got.MaxInterval, tt.maxInterval, nil); diff != "" {
71-
t.Errorf("MaxInterval: %s", diff)
71+
t.Errorf("maxInterval: %s", diff)
7272
}
7373
}
7474
if diff := cmp.Diff(*got.Jitter, tt.jitter, nil); diff != "" {
75-
t.Errorf("Jitter: %s", diff)
75+
t.Errorf("jitter: %s", diff)
7676
}
7777
if got.Multiplier != nil {
7878
if diff := cmp.Diff(*got.Multiplier, tt.multiplier, nil); diff != "" {
79-
t.Errorf("Multiplier: %s", diff)
79+
t.Errorf("multiplier: %s", diff)
8080
}
8181
}
8282
if diff := cmp.Diff(got.Until, tt.until, nil); diff != "" {
83-
t.Errorf("Until: %s", diff)
83+
t.Errorf("until: %s", diff)
8484
}
8585
}
8686
}

option.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ func HTTPRunnerWithHandler(name string, h http.Handler, opts ...httpRunnerOption
305305
}
306306
}
307307
if c.NotFollowRedirect {
308-
bk.runnerErrs[name] = errors.New("HTTPRunnerWithHandler does not support option NotFollowRedirect")
308+
bk.runnerErrs[name] = errors.New("runn.HTTPRunnerWithHandler does not support option NotFollowRedirect")
309309
return nil
310310
}
311311
r.multipartBoundary = c.MultipartBoundary

option_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ func TestSetupBuiltinFunctions(t *testing.T) {
889889
}
890890
for _, tt := range tests {
891891
if bk.funcs[tt.fn] == nil {
892-
t.Errorf("Not exists: %s", tt.fn)
892+
t.Errorf("not exists: %s", tt.fn)
893893
}
894894
}
895895
}

0 commit comments

Comments
 (0)