Comment

Comment by optymizer

  > a painless and even fun process
This claim might be a little too optimistic. I'd like to challenge you (everyone) to associate a User object with an http.Request. Example code in Node.js/ExpressJS:

  function auth(req, res, next) {
    req.User = User("username");
    next();
  }
This is such a simple example of a useful piece of middleware, yet it is so difficult to implement in Go in a 'painless and fun' way.

I would prefer to avoid contention on a global mutex.

I would prefer to keep the compatibility with http.Handler and http.HandlerFunc.

Good luck!

parent optymizer 13 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton