Commit fb3ece09 authored by 楼兰's avatar 楼兰 Committed by Sander van Harmelen

fix url query escape tag (#431)

parent 79dad8e7
...@@ -93,7 +93,7 @@ func (s *TagsService) GetTag(pid interface{}, tag string, options ...OptionFunc) ...@@ -93,7 +93,7 @@ func (s *TagsService) GetTag(pid interface{}, tag string, options ...OptionFunc)
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
u := fmt.Sprintf("projects/%s/repository/tags/%s", url.QueryEscape(project), tag) u := fmt.Sprintf("projects/%s/repository/tags/%s", url.QueryEscape(project), url.QueryEscape(tag))
req, err := s.client.NewRequest("GET", u, nil, options) req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil { if err != nil {
...@@ -154,7 +154,7 @@ func (s *TagsService) DeleteTag(pid interface{}, tag string, options ...OptionFu ...@@ -154,7 +154,7 @@ func (s *TagsService) DeleteTag(pid interface{}, tag string, options ...OptionFu
if err != nil { if err != nil {
return nil, err return nil, err
} }
u := fmt.Sprintf("projects/%s/repository/tags/%s", url.QueryEscape(project), tag) u := fmt.Sprintf("projects/%s/repository/tags/%s", url.QueryEscape(project), url.QueryEscape(tag))
req, err := s.client.NewRequest("DELETE", u, nil, options) req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil { if err != nil {
...@@ -182,7 +182,7 @@ func (s *TagsService) CreateRelease(pid interface{}, tag string, opt *CreateRele ...@@ -182,7 +182,7 @@ func (s *TagsService) CreateRelease(pid interface{}, tag string, opt *CreateRele
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
u := fmt.Sprintf("projects/%s/repository/tags/%s/release", url.QueryEscape(project), tag) u := fmt.Sprintf("projects/%s/repository/tags/%s/release", url.QueryEscape(project), url.QueryEscape(tag))
req, err := s.client.NewRequest("POST", u, opt, options) req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil { if err != nil {
...@@ -215,7 +215,7 @@ func (s *TagsService) UpdateRelease(pid interface{}, tag string, opt *UpdateRele ...@@ -215,7 +215,7 @@ func (s *TagsService) UpdateRelease(pid interface{}, tag string, opt *UpdateRele
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
u := fmt.Sprintf("projects/%s/repository/tags/%s/release", url.QueryEscape(project), tag) u := fmt.Sprintf("projects/%s/repository/tags/%s/release", url.QueryEscape(project), url.QueryEscape(tag))
req, err := s.client.NewRequest("PUT", u, opt, options) req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment