Skip to content

Commit

Permalink
fix: fix some url error
Browse files Browse the repository at this point in the history
  • Loading branch information
chyroc authored and andygrunwald committed Nov 1, 2019
1 parent 9181c5d commit 3f5e365
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func (s *GroupsService) SetGroupDescription(groupID, description string) (*strin
//
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-groups.html#delete-group-description
func (s *GroupsService) DeleteGroupDescription(groupID string) (*Response, error) {
u := fmt.Sprintf("groups/%s/description'", groupID)
u := fmt.Sprintf("groups/%s/description", groupID)
return s.client.DeleteRequest(u, nil)
}

Expand Down
4 changes: 2 additions & 2 deletions groups_member.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (s *GroupsService) AddGroupMembers(groupID string, input *MembersInput) (*[
//
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-groups.html#delete-group-member
func (s *GroupsService) DeleteGroupMember(groupID, accountID string) (*Response, error) {
u := fmt.Sprintf("groups/%s/members/%s'", groupID, accountID)
u := fmt.Sprintf("groups/%s/members/%s", groupID, accountID)
return s.client.DeleteRequest(u, nil)
}

Expand All @@ -122,7 +122,7 @@ func (s *GroupsService) DeleteGroupMember(groupID, accountID string) (*Response,
//
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-groups.html#delete-group-members
func (s *GroupsService) DeleteGroupMembers(groupID string, input *MembersInput) (*Response, error) {
u := fmt.Sprintf("groups/%s/members.delete'", groupID)
u := fmt.Sprintf("groups/%s/members.delete", groupID)

req, err := s.client.NewRequest("POST", u, input)
if err != nil {
Expand Down
16 changes: 8 additions & 8 deletions projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func (s *ProjectsService) GetRepositoryStatistics(projectName string) (*Reposito
//
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#get-config
func (s *ProjectsService) GetConfig(projectName string) (*ConfigInfo, *Response, error) {
u := fmt.Sprintf("projects/%s/config'", url.QueryEscape(projectName))
u := fmt.Sprintf("projects/%s/config", url.QueryEscape(projectName))

req, err := s.client.NewRequest("GET", u, nil)
if err != nil {
Expand All @@ -319,7 +319,7 @@ func (s *ProjectsService) GetConfig(projectName string) (*ConfigInfo, *Response,
//
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#set-project-description
func (s *ProjectsService) SetProjectDescription(projectName string, input *ProjectDescriptionInput) (*string, *Response, error) {
u := fmt.Sprintf("projects/%s/description'", url.QueryEscape(projectName))
u := fmt.Sprintf("projects/%s/description", url.QueryEscape(projectName))

// TODO Use here the getStringResponseWithoutOptions (for PUT requests)

Expand All @@ -345,7 +345,7 @@ func (s *ProjectsService) SetProjectDescription(projectName string, input *Proje
//
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#delete-project-description
func (s *ProjectsService) DeleteProjectDescription(projectName string) (*Response, error) {
u := fmt.Sprintf("projects/%s/description'", url.QueryEscape(projectName))
u := fmt.Sprintf("projects/%s/description", url.QueryEscape(projectName))
return s.client.DeleteRequest(u, nil)
}

Expand All @@ -361,7 +361,7 @@ func (s *ProjectsService) DeleteProjectDescription(projectName string) (*Respons
//
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#ban-commit
func (s *ProjectsService) BanCommit(projectName string, input *BanInput) (*BanResultInfo, *Response, error) {
u := fmt.Sprintf("projects/%s/ban'", url.QueryEscape(projectName))
u := fmt.Sprintf("projects/%s/ban", url.QueryEscape(projectName))

req, err := s.client.NewRequest("PUT", u, input)
if err != nil {
Expand All @@ -382,7 +382,7 @@ func (s *ProjectsService) BanCommit(projectName string, input *BanInput) (*BanRe
//
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#set-config
func (s *ProjectsService) SetConfig(projectName string, input *ConfigInput) (*ConfigInfo, *Response, error) {
u := fmt.Sprintf("projects/%s/config'", url.QueryEscape(projectName))
u := fmt.Sprintf("projects/%s/config", url.QueryEscape(projectName))

req, err := s.client.NewRequest("PUT", u, input)
if err != nil {
Expand All @@ -403,7 +403,7 @@ func (s *ProjectsService) SetConfig(projectName string, input *ConfigInput) (*Co
//
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#set-head
func (s *ProjectsService) SetHEAD(projectName string, input *HeadInput) (*string, *Response, error) {
u := fmt.Sprintf("projects/%s/HEAD'", url.QueryEscape(projectName))
u := fmt.Sprintf("projects/%s/HEAD", url.QueryEscape(projectName))

// TODO Use here the getStringResponseWithoutOptions (for PUT requests)

Expand All @@ -426,7 +426,7 @@ func (s *ProjectsService) SetHEAD(projectName string, input *HeadInput) (*string
//
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#set-project-parent
func (s *ProjectsService) SetProjectParent(projectName string, input *ProjectParentInput) (*string, *Response, error) {
u := fmt.Sprintf("projects/%s/parent'", url.QueryEscape(projectName))
u := fmt.Sprintf("projects/%s/parent", url.QueryEscape(projectName))

// TODO Use here the getStringResponseWithoutOptions (for PUT requests)

Expand All @@ -449,7 +449,7 @@ func (s *ProjectsService) SetProjectParent(projectName string, input *ProjectPar
//
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#run-gc
func (s *ProjectsService) RunGC(projectName string, input *GCInput) (*Response, error) {
u := fmt.Sprintf("projects/%s/gc'", url.QueryEscape(projectName))
u := fmt.Sprintf("projects/%s/gc", url.QueryEscape(projectName))

req, err := s.client.NewRequest("POST", u, input)
if err != nil {
Expand Down

0 comments on commit 3f5e365

Please sign in to comment.