mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
I noticed that building the examples would produce a client with the
default ("Go-http-client/1.1") User-Agent; this is something to look
into (probably should have a saner default), but regardless, it's
good practice to set your own;
- Update examples to show setting the User-Agent
- Use "log.Fatal" instead of "panic"; both exit the binary, but
probably are slightly more readable.
- Use the authconfig.Encode utility, which codifies the canonical
format to encode the JSON, so that users don't have to replicate
the same format.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>