Skip to content

Commit

Permalink
rename func
Browse files Browse the repository at this point in the history
rename func in /pkg/pipeline/remote/gitlab/gitlab.go
  • Loading branch information
xmh19936688 authored and Alena Prokharchyk committed Oct 17, 2018
1 parent 2ad6bdd commit 078d118
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/pipeline/remote/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (c *client) CreateHook(pipeline *v3.Pipeline, accessToken string) (string,

url := fmt.Sprintf("%s/projects/%s/hooks", c.API, project)

resp, err := doRequsetToGitlab(http.MethodPost, url, accessToken, opt)
resp, err := doRequestToGitlab(http.MethodPost, url, accessToken, opt)
if err != nil {
return "", err
}
Expand Down Expand Up @@ -166,7 +166,7 @@ func (c *client) DeleteHook(pipeline *v3.Pipeline, accessToken string) error {
}
if hook != nil {
url := fmt.Sprintf("%s/projects/%s/hooks/%v", c.API, project, hook.ID)
resp, err := doRequsetToGitlab(http.MethodDelete, url, accessToken, nil)
resp, err := doRequestToGitlab(http.MethodDelete, url, accessToken, nil)
if err != nil {
return err
}
Expand Down Expand Up @@ -300,7 +300,7 @@ func (c *client) SetPipelineFileInRepo(repoURL string, branch string, accessToke
option.CommitMessage = &message
}

resp, err := doRequsetToGitlab(method, url, accessToken, option)
resp, err := doRequestToGitlab(method, url, accessToken, option)
defer resp.Body.Close()

return nil
Expand Down Expand Up @@ -445,10 +445,10 @@ func (c *client) getGitlabUser(gitlabAccessToken string) (*gitlab.User, error) {
}

func getFromGitlab(gitlabAccessToken string, url string) (*http.Response, error) {
return doRequsetToGitlab(http.MethodGet, url, gitlabAccessToken, nil)
return doRequestToGitlab(http.MethodGet, url, gitlabAccessToken, nil)
}

func doRequsetToGitlab(method string, url string, gitlabAccessToken string, opt interface{}) (*http.Response, error) {
func doRequestToGitlab(method string, url string, gitlabAccessToken string, opt interface{}) (*http.Response, error) {
req, err := http.NewRequest(method, url, nil)
if err != nil {
return nil, err
Expand Down

0 comments on commit 078d118

Please sign in to comment.