github.com/cpuguy83/dockercfg
Go library to load docker CLI configs, auths, etc. with minimal deps.
So far the only deps are on the stdlib.
Usage
See the godoc for API details.
I'm currently using this in zapp to handle registry auth instead of always asking the user to enter it.