GoogleCloudPlatform / cloud-run-proxy

Local proxy for authenticating requests to Cloud Run
Apache License 2.0
127 stars 20 forks source link

main: fix unnecessary fmt.Errorf and assign to http.Request pointer #12

Closed zchee closed 2 years ago

zchee commented 2 years ago

Fix unnecessary fmt.Errorf and assign to http.Request pointer.

sethvargo commented 2 years ago

Hi @zchee

Thank you for the PR. I believe we do need to assign to the pointer to make the context available on the original request. Also, I'm not sure I see the value of using errors.New over fmt.Errorf. The fmt package is already imported, and switching between errors.New and fmt.Errorf when one might need to add formatting is unnecessary devex overhead for no real performance benefit in this project.

zchee commented 2 years ago

@sethvargo Okay, should close it. Thanks for polite reply :D