Skip to content

Commit 97f221f

Browse files
committed
remove unused code
1 parent 0b304ed commit 97f221f

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

pkg/connector/client/client.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,6 @@ type GitlabClient struct {
2525
accessToken string
2626
}
2727

28-
type transport struct {
29-
BaseURL string
30-
rt http.RoundTripper
31-
accessToken string
32-
}
33-
34-
func (t *transport) RoundTrip(req *http.Request) (*http.Response, error) {
35-
if req.URL.Host == "" {
36-
baseURL, err := url.Parse(t.BaseURL)
37-
if err != nil {
38-
return nil, err
39-
}
40-
req.URL = baseURL.ResolveReference(req.URL)
41-
}
42-
43-
req.Header.Set("Private-Token", t.accessToken)
44-
req.Header.Set("User-Agent", "baton-gitlab/1.0")
45-
46-
return t.rt.RoundTrip(req)
47-
}
48-
4928
func New(ctx context.Context, accessToken, baseURL, accountCreationGroup string) (*GitlabClient, error) {
5029
options := []uhttp.Option{uhttp.WithLogger(true, ctxzap.Extract(ctx)), uhttp.WithUserAgent("baton-gitlab/1.0")}
5130

0 commit comments

Comments
 (0)