Skip to content

Commit

Permalink
Fix gosec lint issues (#6107)
Browse files Browse the repository at this point in the history
This fixes the new lint issues so #6101 can upgrade golangci-lint.
  • Loading branch information
dmathieu authored Sep 11, 2024
1 parent 774b20e commit 5425de9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func (s *testServer) UnaryCall(ctx context.Context, in *testpb.SimpleRequest) (*
}
}
if st != nil && st.Code != 0 {
return nil, status.Error(codes.Code(st.Code), st.Message)
return nil, status.Error(codes.Code(st.Code), st.Message) // nolint:gosec // Status code can't be negative.
}
pl, err := serverNewPayload(in.GetResponseType(), in.GetResponseSize())
if err != nil {
Expand Down Expand Up @@ -344,7 +344,7 @@ func (s *testServer) FullDuplexCall(stream testpb.TestService_FullDuplexCallServ
}
st := in.GetResponseStatus()
if st != nil && st.Code != 0 {
return status.Error(codes.Code(st.Code), st.Message)
return status.Error(codes.Code(st.Code), st.Message) // nolint:gosec // Status code can't be negative.
}

cs := in.GetResponseParameters()
Expand Down

0 comments on commit 5425de9

Please sign in to comment.