Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea committed Apr 15, 2024
1 parent f15a0bb commit 0838284
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/services/echo_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ func (s *echoServerImpl) Echo(ctx context.Context, in *pb.EchoRequest) (*pb.Echo
}
echoHeaders(ctx)
echoTrailers(ctx)
request_headers := make(map[string]*pb.EchoResponse_RepeatedValues)
headers_to_track := in.GetHttpRequestHeaderToEcho()
requestHeaders := make(map[string]*pb.EchoResponse_RepeatedValues)
headersToTrack := in.GetHttpRequestHeaderToEcho()
for k, v := range md {
if slices.Contains(headers_to_track, k) {
request_headers[k] = &pb.EchoResponse_RepeatedValues{HeaderValues: v}
if slices.Contains(headersToTrack, k) {
requestHeaders[k] = &pb.EchoResponse_RepeatedValues{HeaderValues: v}
}
}

return &pb.EchoResponse{Content: in.GetContent(), Severity: in.GetSeverity(), RequestId: in.GetRequestId(), OtherRequestId: in.GetOtherRequestId(), HttpRequestHeaderValue: request_headers}, nil
return &pb.EchoResponse{Content: in.GetContent(), Severity: in.GetSeverity(), RequestId: in.GetRequestId(), OtherRequestId: in.GetOtherRequestId(), HttpRequestHeaderValue: requestHeaders}, nil
}

func (s *echoServerImpl) EchoErrorDetails(ctx context.Context, in *pb.EchoErrorDetailsRequest) (*pb.EchoErrorDetailsResponse, error) {
Expand Down

0 comments on commit 0838284

Please sign in to comment.