diff options
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/freeze_periods.go')
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/freeze_periods.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/freeze_periods.go b/vendor/github.com/xanzy/go-gitlab/freeze_periods.go index f7483f3262..dfcca0789d 100644 --- a/vendor/github.com/xanzy/go-gitlab/freeze_periods.go +++ b/vendor/github.com/xanzy/go-gitlab/freeze_periods.go @@ -1,5 +1,5 @@ // -// Copyright 2020 Paul Cioanca +// Copyright 2021 Paul Cioanca // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package gitlab import ( "fmt" + "net/http" "time" ) @@ -60,7 +61,7 @@ func (s *FreezePeriodsService) ListFreezePeriods(pid interface{}, opt *ListFreez } u := fmt.Sprintf("projects/%s/freeze_periods", 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 } @@ -85,7 +86,7 @@ func (s *FreezePeriodsService) GetFreezePeriod(pid interface{}, freezePeriod int } u := fmt.Sprintf("projects/%s/freeze_periods/%d", pathEscape(project), freezePeriod) - 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 } @@ -121,7 +122,7 @@ func (s *FreezePeriodsService) CreateFreezePeriodOptions(pid interface{}, opt *C } u := fmt.Sprintf("projects/%s/freeze_periods", 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 } @@ -157,7 +158,7 @@ func (s *FreezePeriodsService) UpdateFreezePeriodOptions(pid interface{}, freeze } u := fmt.Sprintf("projects/%s/freeze_periods/%d", pathEscape(project), freezePeriod) - 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 } @@ -184,7 +185,7 @@ func (s *FreezePeriodsService) DeleteFreezePeriod(pid interface{}, freezePeriod } u := fmt.Sprintf("projects/%s/freeze_periods/%d", pathEscape(project), freezePeriod) - req, err := s.client.NewRequest("DELETE", u, nil, options) + req, err := s.client.NewRequest(http.MethodDelete, u, nil, options) if err != nil { return nil, err } |