alingse opened a new pull request, #2682: URL: https://github.com/apache/dubbo-go/pull/2682
I was running github actions to run linter [makezero](https://github.com/ashanbrown/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 ``` ==================================================================================================== 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. ```go 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())) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
