goadesign / goa

🌟 Goa: Elevate Go API development! 🚀 Streamlined design, automatic code generation, and seamless HTTP/gRPC support. ✨
https://goa.design
MIT License
5.54k stars 556 forks source link

Save r.URL.Query() in a variable #3506

Closed duckbrain closed 3 months ago

duckbrain commented 3 months ago

If there are multiple query parameters, save the call to Query() in a variable.

Prevents r.URL.Query() from being called multiple times for a handling a single request. Prevents unneeded churn on generated code by only applying that change to code that generates mutliple query parameters.

Closes #3505

raphael commented 3 months ago

This is great, thank you!