Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: common/api/gitiles/gitiles.go

Issue 2986953002: gitiles: go back to QueryEscape because url.PathEscape is not in Go1.6. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/api/gitiles/gitiles.go
diff --git a/common/api/gitiles/gitiles.go b/common/api/gitiles/gitiles.go
index ac6dfd9296bb15e18cbacaed22a0b3820370c24a..6f7aa9f0329188a7b70ffcbe1b341211004bb79c 100644
--- a/common/api/gitiles/gitiles.go
+++ b/common/api/gitiles/gitiles.go
@@ -138,7 +138,8 @@ func (c *Client) Log(ctx context.Context, repoURL, treeish string, limit int) ([
if limit < 1 {
return nil, fmt.Errorf("limit must be at least 1, but %d provided", limit)
}
- subPath := fmt.Sprintf("+log/%s?format=JSON", url.PathEscape(treeish))
+ // TODO(tandrii): s/QueryEscape/PathEscape once AE deployments are Go1.8+.
+ subPath := fmt.Sprintf("+log/%s?format=JSON", url.QueryEscape(treeish))
resp := &logResponse{}
if err := c.get(ctx, repoURL, subPath, resp); err != nil {
return nil, err
@@ -191,7 +192,8 @@ func (c *Client) Refs(ctx context.Context, repoURL, refsPath string) (map[string
}
refsPath = strings.TrimRight(refsPath, "/")
- subPath := fmt.Sprintf("+%s?format=json", url.PathEscape(refsPath))
+ // TODO(tandrii): s/QueryEscape/PathEscape once AE deployments are Go1.8+.
+ subPath := fmt.Sprintf("+%s?format=json", url.QueryEscape(refsPath))
resp := refsResponse{}
if err := c.get(ctx, repoURL, subPath, &resp); err != nil {
return nil, err
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698