lxc/lxd — pull request #129 by tych0 (2014-12-16 20:48:28+00:00)
Title: Enforce every code path returning a response

LXD had several code paths which would not return a response (or would return
some bogus response). In addition, the code was often more verbose than it
needed to be, having to pass around the ResponseWriter everywhere that needed
it.

This commit resolves that by introducing our own signature for http handler
types, the Response type. You can still do arbitrary stuff to the
ResponseWriter if you want (see the container file handler code), but this uses
the compiler to enforce that every code path actually returns a response. It is
also significatly less ugly, with no bare returns and not having to pass the
ResponseWriter everywhere.

Closes #101

Signed-off-by: Tycho Andersen