From e6881cabd0d9da20869b43ac5e8c9bec49f4136f Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Wed, 13 Sep 2023 11:46:29 -0700 Subject: [PATCH] remove unused --- server/auth.go | 2 +- server/images.go | 2 +- server/upload.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/auth.go b/server/auth.go index 4238b252..8e958d77 100644 --- a/server/auth.go +++ b/server/auth.go @@ -71,7 +71,7 @@ func (r AuthRedirect) URL() (*url.URL, error) { return redirectURL, nil } -func getAuthToken(ctx context.Context, redirData AuthRedirect, regOpts *RegistryOptions) (string, error) { +func getAuthToken(ctx context.Context, redirData AuthRedirect) (string, error) { redirectURL, err := redirData.URL() if err != nil { return "", err diff --git a/server/images.go b/server/images.go index faf0205d..d5e53dd1 100644 --- a/server/images.go +++ b/server/images.go @@ -1394,7 +1394,7 @@ func makeRequestWithRetry(ctx context.Context, method string, requestURL *url.UR case resp.StatusCode == http.StatusUnauthorized: auth := resp.Header.Get("www-authenticate") authRedir := ParseAuthRedirectString(auth) - token, err := getAuthToken(ctx, authRedir, regOpts) + token, err := getAuthToken(ctx, authRedir) if err != nil { return nil, err } diff --git a/server/upload.go b/server/upload.go index a8c62827..a977581f 100644 --- a/server/upload.go +++ b/server/upload.go @@ -125,7 +125,7 @@ func uploadBlobChunked(ctx context.Context, requestURL *url.URL, layer *Layer, r auth := resp.Header.Get("www-authenticate") authRedir := ParseAuthRedirectString(auth) - token, err := getAuthToken(ctx, authRedir, regOpts) + token, err := getAuthToken(ctx, authRedir) if err != nil { return err }