veyron/...: avoid returning unexported types from exported constructors
This has always been sort of controversial, but it turns out it's also a
potentially insidious source of bugs: returning a nil object (e.g. upon errors)
does not result in a nil interface when the lvalue is an interface. For an
example, see: http://play.golang.org/p/XAZs3EZI2Z
Since this has bitten us with the application server, I'm tracking down and
changing other places in the codebase where we were returning pointers to
unexported types. Most are probably harmless, but could potentially become bugs
in the future if we start returning nil objects and we set interface variables
to that.
MultiPart: 1/3
Change-Id: I36bd6ef258e86e2b74dd96c23f651604f2b0baea
23 files changed