Commit 2d02ff27 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

misc/chrome/gophertool: update URLs from code.google.com to new homes

Change-Id: I46bf9f1b84a331cabce2d3417b2b59ccb83d00fa
Reviewed-on: https://go-review.googlesource.com/1532Reviewed-by: 's avatarDavid Symonds <dsymonds@golang.org>
parent 8476d4cf
...@@ -13,20 +13,22 @@ function urlForInput(t) { ...@@ -13,20 +13,22 @@ function urlForInput(t) {
if (numericRE.test(t)) { if (numericRE.test(t)) {
if (t < 150000) { if (t < 150000) {
return "http://code.google.com/p/go/issues/detail?id=" + t; // We could use the golang.org/cl/ handler here, but
// avoid some redirect latency and go right there, since
// one is easy. (no server-side mapping)
return "https://github.com/golang/go/issues/" + t;
} }
return "http://codereview.appspot.com/" + t + "/"; return "https://golang.org/cl/" + t;
} }
var match = commitRE.exec(t); var match = commitRE.exec(t);
if (match) { if (match) {
return "http://code.google.com/p/go/source/detail?r=" + match[1]; return "https://golang.org/change/" + match[1];
} }
if (pkgRE.test(t)) { if (pkgRE.test(t)) {
// TODO: make this smarter, using a list of packages + substring matches. // TODO: make this smarter, using a list of packages + substring matches.
// Get the list from godoc itself in JSON format? // Get the list from godoc itself in JSON format?
// TODO: prefer localhost:6060 to golang.org if localhost:6060 is responding.
return "http://golang.org/pkg/" + t; return "http://golang.org/pkg/" + t;
} }
......
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