summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/xanzy/go-gitlab/gitignore_templates.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/gitignore_templates.go')
-rw-r--r--vendor/github.com/xanzy/go-gitlab/gitignore_templates.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/gitignore_templates.go b/vendor/github.com/xanzy/go-gitlab/gitignore_templates.go
index e2dea83647..bf066c9e62 100644
--- a/vendor/github.com/xanzy/go-gitlab/gitignore_templates.go
+++ b/vendor/github.com/xanzy/go-gitlab/gitignore_templates.go
@@ -1,5 +1,5 @@
//
-// Copyright 2018, 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.
@@ -18,6 +18,7 @@ package gitlab
import (
"fmt"
+ "net/http"
"net/url"
)
@@ -48,7 +49,7 @@ type ListTemplatesOptions ListOptions
// GitLab API docs:
// https://docs.gitlab.com/ce/api/templates/gitignores.html#list-gitignore-templates
func (s *GitIgnoreTemplatesService) ListTemplates(opt *ListTemplatesOptions, options ...RequestOptionFunc) ([]*GitIgnoreTemplate, *Response, error) {
- req, err := s.client.NewRequest("GET", "templates/gitignores", opt, options)
+ req, err := s.client.NewRequest(http.MethodGet, "templates/gitignores", opt, options)
if err != nil {
return nil, nil, err
}
@@ -69,7 +70,7 @@ func (s *GitIgnoreTemplatesService) ListTemplates(opt *ListTemplatesOptions, opt
func (s *GitIgnoreTemplatesService) GetTemplate(key string, options ...RequestOptionFunc) (*GitIgnoreTemplate, *Response, error) {
u := fmt.Sprintf("templates/gitignores/%s", url.PathEscape(key))
- 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
}