This patch updates the godo package to use a portable Go context -- a
Context that works with Go versions prior to Go 1.7 as well as Go 1.7
and onwards.
> Go 1.7 adds support for maps using keys with integer types: the
> encoding uses a quoted decimal representation as the JSON key.
in: https://tip.golang.org/doc/go1.7, under encoding/json
When adding options to a path, don't drop existing keys. This will enable image pagination when there is a type key to work. The bug was trying to addOptions to an existing path with query values. Previously if a path `/path?type=alpha` was passed, key `page=2` would be appeneded, but `type=alpha` would be dropped.
This makes it possible for consumers of the package to debug API calls made to the DO APIs.
Usage:
client.OnRequestCompleted(func(req *http.Request, resp *http.Response) {
// ... e.g. use httputil.DumpRequest / httputil.DumpResponse
})