summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/xanzy/go-gitlab/labels.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/labels.go')
-rw-r--r--vendor/github.com/xanzy/go-gitlab/labels.go19
1 files changed, 10 insertions, 9 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/labels.go b/vendor/github.com/xanzy/go-gitlab/labels.go
index 0aab8c5e28..c81a1ef80e 100644
--- a/vendor/github.com/xanzy/go-gitlab/labels.go
+++ b/vendor/github.com/xanzy/go-gitlab/labels.go
@@ -1,5 +1,5 @@
//
-// Copyright 2017, Sander van Harmelen
+// Copyright 2021, Sander van Harmelen
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@ package gitlab
import (
"encoding/json"
"fmt"
+ "net/http"
)
// LabelsService handles communication with the label related methods of the
@@ -89,7 +90,7 @@ func (s *LabelsService) ListLabels(pid interface{}, opt *ListLabelsOptions, opti
}
u := fmt.Sprintf("projects/%s/labels", pathEscape(project))
- req, err := s.client.NewRequest("GET", u, opt, options)
+ req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -117,7 +118,7 @@ func (s *LabelsService) GetLabel(pid interface{}, labelID interface{}, options .
}
u := fmt.Sprintf("projects/%s/labels/%s", pathEscape(project), label)
- req, err := s.client.NewRequest("GET", u, nil, options)
+ req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -151,7 +152,7 @@ func (s *LabelsService) CreateLabel(pid interface{}, opt *CreateLabelOptions, op
}
u := fmt.Sprintf("projects/%s/labels", pathEscape(project))
- req, err := s.client.NewRequest("POST", u, opt, options)
+ req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -182,7 +183,7 @@ func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions, op
}
u := fmt.Sprintf("projects/%s/labels", pathEscape(project))
- req, err := s.client.NewRequest("DELETE", u, opt, options)
+ req, err := s.client.NewRequest(http.MethodDelete, u, opt, options)
if err != nil {
return nil, err
}
@@ -211,7 +212,7 @@ func (s *LabelsService) UpdateLabel(pid interface{}, opt *UpdateLabelOptions, op
}
u := fmt.Sprintf("projects/%s/labels", pathEscape(project))
- req, err := s.client.NewRequest("PUT", u, opt, options)
+ req, err := s.client.NewRequest(http.MethodPut, u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -242,7 +243,7 @@ func (s *LabelsService) SubscribeToLabel(pid interface{}, labelID interface{}, o
}
u := fmt.Sprintf("projects/%s/labels/%s/subscribe", pathEscape(project), label)
- req, err := s.client.NewRequest("POST", u, nil, options)
+ req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -273,7 +274,7 @@ func (s *LabelsService) UnsubscribeFromLabel(pid interface{}, labelID interface{
}
u := fmt.Sprintf("projects/%s/labels/%s/unsubscribe", pathEscape(project), label)
- req, err := s.client.NewRequest("POST", u, nil, options)
+ req, err := s.client.NewRequest(http.MethodPost, u, nil, options)
if err != nil {
return nil, err
}
@@ -296,7 +297,7 @@ func (s *LabelsService) PromoteLabel(pid interface{}, labelID interface{}, optio
}
u := fmt.Sprintf("projects/%s/labels/%s/promote", pathEscape(project), label)
- req, err := s.client.NewRequest("PUT", u, nil, options)
+ req, err := s.client.NewRequest(http.MethodPut, u, nil, options)
if err != nil {
return nil, err
}