summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-10-12 03:15:15 +0200
committerGitHub <noreply@github.com>2020-10-12 09:15:15 +0800
commit845d0afb3326f147dc78059bbdcecf45c3a9a0df (patch)
tree6f321737621e6e14898d0306ec0e6ba509a63b7f /modules
parent64133126cdb842a047b2cd104c2f177f6e83f79a (diff)
downloadgitea-845d0afb3326f147dc78059bbdcecf45c3a9a0df.tar.gz
gitea-845d0afb3326f147dc78059bbdcecf45c3a9a0df.zip
4 line diff (#13103)
Diffstat (limited to 'modules')
-rw-r--r--modules/migrations/gitlab.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/migrations/gitlab.go b/modules/migrations/gitlab.go
index 7ed3d5645f..379a2f2b60 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 != "" {