refactor(tools/hubl): don't use nil panic (#20515)

This commit is contained in:
Zoro
2024-06-03 07:51:47 +00:00
committed by GitHub
parent 0f81966de8
commit 597fbb13b7
+1 -1
View File
@@ -59,7 +59,7 @@ func loadFileDescriptorsGRPCReflection(ctx context.Context, client *grpc.ClientC
switch res := in.MessageResponse.(type) {
case *grpc_reflection_v1alpha.ServerReflectionResponse_ErrorResponse:
panic(err)
panic(res.ErrorResponse.String()) //nolint:staticcheck // we want to use the deprecated field
case *grpc_reflection_v1alpha.ServerReflectionResponse_ListServicesResponse:
waitListServiceRes <- res.ListServicesResponse //nolint:staticcheck // we want to use the deprecated field
case *grpc_reflection_v1alpha.ServerReflectionResponse_FileDescriptorResponse: