Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit 472410d

Browse files
committed
style: moving code around
By mistake I placed it in between code and error check
1 parent 30bd934 commit 472410d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/requestv2.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ func (r *RequestAccessorV2) EventToRequest(req events.APIGatewayV2HTTPRequest) (
158158
bytes.NewReader(decodedBody),
159159
)
160160

161-
httpRequest.RemoteAddr = req.RequestContext.HTTP.SourceIP
162-
163161
if err != nil {
164162
fmt.Printf("Could not convert request %s:%s to http.Request\n", req.RequestContext.HTTP.Method, req.RequestContext.HTTP.Path)
165163
log.Println(err)
166164
return nil, err
167165
}
168166

167+
httpRequest.RemoteAddr = req.RequestContext.HTTP.SourceIP
168+
169169
for _, cookie := range req.Cookies {
170170
httpRequest.Header.Add("Cookie", cookie)
171171
}

0 commit comments

Comments
 (0)