]> source.dussan.org Git - gitea.git/commitdiff
4 line diff (#13103)
author6543 <6543@obermui.de>
Mon, 12 Oct 2020 01:15:15 +0000 (03:15 +0200)
committerGitHub <noreply@github.com>
Mon, 12 Oct 2020 01:15:15 +0000 (09:15 +0800)
modules/migrations/gitlab.go

index 7ed3d5645f3f35d1f73166005e6bbfc3d611af10..379a2f2b60826c5109697a117001f1006db98406 100644 (file)
@@ -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 != "" {