diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2017-02-19 01:49:51 +0000 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2017-02-19 01:49:51 +0000 |
commit | eb57eaf30965ba24ff669d6f9c8d11cd24951777 (patch) | |
tree | d04d1e425f0fce5c0f696b8cab7e660630cbd362 /vendor/github.com/xanzy/go-gitlab/labels.go | |
parent | e8ff7ffe8e8c25195c64950b61c6c5754bbcd3ba (diff) |
update dependencies
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/labels.go')
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/labels.go | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/labels.go b/vendor/github.com/xanzy/go-gitlab/labels.go index 7063da9..8d571b7 100644 --- a/vendor/github.com/xanzy/go-gitlab/labels.go +++ b/vendor/github.com/xanzy/go-gitlab/labels.go @@ -48,14 +48,14 @@ func (l Label) String() string { // ListLabels gets all labels for given project. // // GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#list-labels -func (s *LabelsService) ListLabels(pid interface{}) ([]*Label, *Response, error) { +func (s *LabelsService) ListLabels(pid interface{}, options ...OptionFunc) ([]*Label, *Response, error) { project, err := parseID(pid) if err != nil { return nil, nil, err } u := fmt.Sprintf("projects/%s/labels", url.QueryEscape(project)) - req, err := s.client.NewRequest("GET", u, nil) + req, err := s.client.NewRequest("GET", u, nil, options) if err != nil { return nil, nil, err } @@ -82,16 +82,14 @@ type CreateLabelOptions struct { // color. // // GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#create-a-new-label -func (s *LabelsService) CreateLabel( - pid interface{}, - opt *CreateLabelOptions) (*Label, *Response, error) { +func (s *LabelsService) CreateLabel(pid interface{}, opt *CreateLabelOptions, options ...OptionFunc) (*Label, *Response, error) { project, err := parseID(pid) if err != nil { return nil, nil, err } u := fmt.Sprintf("projects/%s/labels", url.QueryEscape(project)) - req, err := s.client.NewRequest("POST", u, opt) + req, err := s.client.NewRequest("POST", u, opt, options) if err != nil { return nil, nil, err } @@ -115,14 +113,14 @@ type DeleteLabelOptions struct { // DeleteLabel deletes a label given by its name. // // GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label -func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions) (*Response, error) { +func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions, options ...OptionFunc) (*Response, error) { project, err := parseID(pid) if err != nil { return nil, err } u := fmt.Sprintf("projects/%s/labels", url.QueryEscape(project)) - req, err := s.client.NewRequest("DELETE", u, opt) + req, err := s.client.NewRequest("DELETE", u, opt, options) if err != nil { return nil, err } @@ -144,16 +142,14 @@ type UpdateLabelOptions struct { // one parameter is required, to update the label. // // GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#edit-an-existing-label -func (s *LabelsService) UpdateLabel( - pid interface{}, - opt *UpdateLabelOptions) (*Label, *Response, error) { +func (s *LabelsService) UpdateLabel(pid interface{}, opt *UpdateLabelOptions, options ...OptionFunc) (*Label, *Response, error) { project, err := parseID(pid) if err != nil { return nil, nil, err } u := fmt.Sprintf("projects/%s/labels", url.QueryEscape(project)) - req, err := s.client.NewRequest("PUT", u, opt) + req, err := s.client.NewRequest("PUT", u, opt, options) if err != nil { return nil, nil, err } |