From 84974fce333a7e6804154180e794609fa38edbf9 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 11 Oct 2020 22:38:56 +0200 Subject: [PATCH] 4 line diff --- modules/migrations/gitlab.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/migrations/gitlab.go b/modules/migrations/gitlab.go index 7ed3d5645f3f3..379a2f2b60826 100644 --- a/modules/migrations/gitlab.go +++ b/modules/migrations/gitlab.go @@ -74,9 +74,7 @@ type GitlabDownloader struct { // Use either a username/password, personal token entered into the username field, or anonymous/public access // Note: Public access only allows very basic access func NewGitlabDownloader(ctx context.Context, baseURL, repoPath, username, password, token string) (*GitlabDownloader, error) { - var gitlabClient *gitlab.Client - var err error - gitlabClient, err = gitlab.NewClient(token, gitlab.WithBaseURL(baseURL)) + gitlabClient, err := gitlab.NewClient(token, gitlab.WithBaseURL(baseURL)) // Only use basic auth if token is blank and password is NOT // Basic auth will fail with empty strings, but empty token will allow anonymous public API usage if token == "" && password != "" {