logoalt Hacker News

xyzzy_plughtoday at 12:56 AM1 replyview on HN

The Go standard library has learned to interpret path variables as well:

https://go.dev/blog/routing-enhancements


Replies

zimpenfishtoday at 8:52 AM

To be fair, it's not -quite- as useful - `req.PathValue` only returns `string` and you have to do the conversion to other types yourself which could lead to a faffy mess of code.