====================================================================================================
append to slice `vhs` with non-zero initialized length at https://github.com/apache/dubbo-go/blob/main/xds/client/resource/filter_chain.go#L119:9
append to slice `keyList` with non-zero initialized length at https://github.com/apache/dubbo-go/blob/main/protocol/dubbo3/dubbo3_protocol.go#L156:13
append to slice `in` with non-zero initialized length at https://github.com/apache/dubbo-go/blob/main/proxy/proxy_factory/pass_through.go#L[10](https://github.com/alingse/go-linter-runner/actions/runs/9242652074/job/25425741161#step:4:11)5:7
append to slice `in` with non-zero initialized length at https://github.com/apache/dubbo-go/blob/main/proxy/proxy_factory/pass_through.go#L106:7
append to slice `in` with non-zero initialized length at https://github.com/apache/dubbo-go/blob/main/proxy/proxy_factory/pass_through.go#L107:7
append to slice `in` with non-zero initialized length at https://github.com/apache/dubbo-go/blob/main/proxy/proxy_factory/pass_through.go#L108:7
append to slice `in` with non-zero initialized length at https://github.com/apache/dubbo-go/blob/main/proxy/proxy_factory/pass_through.go#L109:7
append to slice `subInstances` with non-zero initialized length at https://github.com/apache/dubbo-go/blob/main/registry/servicediscovery/service_instances_changed_listener_impl.go#L[11](https://github.com/alingse/go-linter-runner/actions/runs/9242652074/job/25425741161#step:4:12)9:36
====================================================================================================
the vhs , keyList , subInstances is easy to check that they are bugs and they need make the slice to zero length.
but the other lines has var in that linter reported, I don't know if they are some special usage, so I wasn't commit them.
in := make([]reflect.Value, 5) // maybe should replace with in := make([]reflect.Value, 0, 5)
in = append(in, srv.Rcvr())
in = append(in, reflect.ValueOf(invocation.MethodName()))
in = append(in, reflect.ValueOf(invocation.GetAttachmentInterface(constant.ParamsTypeKey)))
in = append(in, reflect.ValueOf(args))
in = append(in, reflect.ValueOf(invocation.Attachments()))
I was running github actions to run linter makezero for top github golang repos.
see issues https://github.com/alingse/go-linter-runner/issues/1
and the github actions output https://github.com/alingse/go-linter-runner/actions/runs/9242652074/job/25425741161
the
vhs
,keyList
,subInstances
is easy to check that they are bugs and they need make the slice to zero length.but the other lines has var
in
that linter reported, I don't know if they are some special usage, so I wasn't commit them.