diff options
author | 6543 <6543@obermui.de> | 2020-04-19 22:23:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-19 21:23:05 +0100 |
commit | 82dbb34c9c2d0efa8eeb8df845ee3e283024b1d6 (patch) | |
tree | 45f81306d304a30be114187b72bdfd3e1be18e6e /modules/migrations | |
parent | 5c092eb0ef9347e88db59618902781e099880196 (diff) | |
download | gitea-82dbb34c9c2d0efa8eeb8df845ee3e283024b1d6.tar.gz gitea-82dbb34c9c2d0efa8eeb8df845ee3e283024b1d6.zip |
Vendor Update: go-gitlab v0.22.1 -> v0.31.0 (#11136)
* vendor update: go-gitlab to v0.31.0
* migrate client init to v0.31.0
* refactor
Diffstat (limited to 'modules/migrations')
-rw-r--r-- | modules/migrations/gitlab.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/migrations/gitlab.go b/modules/migrations/gitlab.go index 843e90c177..02891d504d 100644 --- a/modules/migrations/gitlab.go +++ b/modules/migrations/gitlab.go @@ -8,7 +8,6 @@ import ( "context" "errors" "fmt" - "net/http" "net/url" "strings" "time" @@ -87,15 +86,13 @@ 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(baseURL, repoPath, username, password string) *GitlabDownloader { - var client *http.Client var gitlabClient *gitlab.Client var err error if username != "" { if password == "" { - gitlabClient = gitlab.NewClient(client, username) + gitlabClient, err = gitlab.NewClient(username) } else { - gitlabClient, err = gitlab.NewBasicAuthClient(client, baseURL, username, password) - + gitlabClient, err = gitlab.NewBasicAuthClient(username, password, gitlab.WithBaseURL(baseURL)) } } |