Change method signatures to make required arguments actually
required (using a paramater), all accross the API.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
In general, `net/context.Context` should be the first argument to
methods that may be on a request call chain. While some API methods had
context, many did not, making support inconsistent. Applications that
require full plumbing of context, such as those that rely on
cancellation for resource cleanup, would be incompatible with
inconsistent plumbing. The change takes a first pass at adding context
through the entire API.
Signed-off-by: Stephen J Day <stephen.day@docker.com>
There's no need to check for error-nilness if
we're going to return a "nil" on success.
Also, removed defer statements because they
were no longer needed, and have some
overhead; http://lk4d4.darth.io/posts/defer/
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>