refactor driver auth for easier passing

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2020-11-15 20:49:58 -08:00
parent 1ccf0bd7d8
commit 378bf70d4b
9 changed files with 23 additions and 18 deletions

View File

@ -111,6 +111,9 @@ func toCredentialsFunc(a Auth) func(string) (string, string, error) {
}
func RegistryAuthForRef(ref string, a Auth) (string, error) {
if a == nil {
return "", nil
}
r, err := parseRef(ref)
if err != nil {
return "", err