From d073b1275d30b6e7d7b67f71204093dbb283b2de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= <mitr@redhat.com>
Date: Sat, 11 Sep 2021 23:05:22 +0200
Subject: [PATCH] Call MakeXRegistryConfigHeader instead of Header(...,
 XRegistryConfigHeader)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

All callers hard-code a header value, so this is actually shorter.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
---
 pkg/bindings/images/build.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go
index be6e5ab558..0f73604e11 100644
--- a/pkg/bindings/images/build.go
+++ b/pkg/bindings/images/build.go
@@ -294,12 +294,12 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
 		err     error
 	)
 	if options.SystemContext == nil {
-		headers, err = auth.Header(options.SystemContext, auth.XRegistryConfigHeader, "", "", "")
+		headers, err = auth.MakeXRegistryConfigHeader(options.SystemContext, "", "", "")
 	} else {
 		if options.SystemContext.DockerAuthConfig != nil {
 			headers, err = auth.Header(options.SystemContext, auth.XRegistryAuthHeader, options.SystemContext.AuthFilePath, options.SystemContext.DockerAuthConfig.Username, options.SystemContext.DockerAuthConfig.Password)
 		} else {
-			headers, err = auth.Header(options.SystemContext, auth.XRegistryConfigHeader, options.SystemContext.AuthFilePath, "", "")
+			headers, err = auth.MakeXRegistryConfigHeader(options.SystemContext, options.SystemContext.AuthFilePath, "", "")
 		}
 	}
 	if err != nil {