Skip to content

Commit 280b3ec

Browse files
committed
Fix recvnames warn
1 parent 8c5f817 commit 280b3ec

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.gostyle.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ analyzers:
44
analyzers-settings:
55
ifacenames:
66
all: true # all interface names with the -er suffix are required (default: false)
7+
recvnames:
8+
max: 3
79
repetition:
810
exclude:
911
- pathstr

cdpfn.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -333,19 +333,19 @@ func findCDPFn(k string) (string, CDPFn, error) {
333333
return "", CDPFn{}, fmt.Errorf("not found function: %s", k)
334334
}
335335

336-
func (args CDPFnArgs) ArgArgs() CDPFnArgs { //nostyle:recvtype
336+
func (a CDPFnArgs) ArgArgs() CDPFnArgs { //nostyle:recvtype
337337
res := CDPFnArgs{}
338-
for _, arg := range args {
338+
for _, arg := range a {
339339
if arg.Typ == CDPArgTypeArg {
340340
res = append(res, arg)
341341
}
342342
}
343343
return res
344344
}
345345

346-
func (args CDPFnArgs) ResArgs() CDPFnArgs { //nostyle:recvtype
346+
func (a CDPFnArgs) ResArgs() CDPFnArgs { //nostyle:recvtype
347347
res := CDPFnArgs{}
348-
for _, arg := range args {
348+
for _, arg := range a {
349349
if arg.Typ == CDPArgTypeRes {
350350
res = append(res, arg)
351351
}

0 commit comments

Comments
 (0)