News for hackers. Stuff that matters.
Re:Learning Go as a Node.js Developer by yur83838 on Friday February 09, 2018 @12:36AM (#16338129)
You don't need a router, but it is much more readable with one.

You don't need middleware, but it is much more readable with r.Use(jwtVerify) then writing a deeply nested half router with logic.

If you're running a single endpoint, then the router is adding zero value.

Re:Learning Go as a Node.js Developer by dithering on Friday February 09, 2018 @01:56AM (#16338441)
Readability is, I think, a function of your expectations. If you're used to seeing a particular incantation, it's readable. Personally (emphasis on the personally, which is my point), I don't think it gets much more readable that a great big switch statement.