internal/dl: use go.dev domain in documentation
Since golang.org/dl/ always redirects to go.dev/dl/,
update the documentation accordingly.
Updates golang/go#34864.
Change-Id: Ied245b8765a2570609ea30441ffe7676b04796aa
Reviewed-on: https://go-review.googlesource.com/c/website/+/401094
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/internal/dl/dl.go b/internal/dl/dl.go
index 12096c1..0069d0b 100644
--- a/internal/dl/dl.go
+++ b/internal/dl/dl.go
@@ -2,27 +2,26 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Package dl implements a simple downloads frontend server.
+// Package dl implements a simple Go downloads frontend server.
//
-// It accepts HTTP POST requests to create a new download metadata entity, and
-// lists entities with sorting and filtering.
-// It is designed to run only on the instance of godoc that serves golang.org.
+// It accepts HTTP POST requests to create a new download metadata entity,
+// and lists entities with sorting and filtering.
//
-// The package also serves the list of downloads and individual files at:
+// The list of downloads, as well as individual files, are served at:
//
-// https://golang.org/dl/
-// https://golang.org/dl/{file}
+// https://go.dev/dl/
+// https://go.dev/dl/{file}
//
// An optional query param, mode=json, serves the list of stable release
// downloads in JSON format:
//
-// https://golang.org/dl/?mode=json
+// https://go.dev/dl/?mode=json
//
// An additional query param, include=all, when used with the mode=json
// query param, will serve a full list of available downloads, including
// unstable, stable, and archived releases, in JSON format:
//
-// https://golang.org/dl/?mode=json&include=all
+// https://go.dev/dl/?mode=json&include=all
//
// Releases returned in JSON modes are sorted by version, newest to oldest.
package dl
@@ -41,7 +40,7 @@
cacheDuration = time.Hour
)
-// File represents a file on the golang.org downloads page.
+// File represents a file on the go.dev downloads page.
// It should be kept in sync with the upload code in x/build/cmd/release.
type File struct {
Filename string `json:"filename"`
@@ -133,7 +132,7 @@
// URL returns the canonical URL of the file.
func (f File) URL() string {
// The download URL of a Go release file is /dl/{name}. It is handled by getHandler.
- // Use a relative URL so it works for any host like golang.org and golang.google.cn.
+ // Use a relative URL so it works for any host like go.dev and golang.google.cn.
// Don't shortcut to the redirect target here, we want canonical URLs to be visible. See issue 38713.
return "/dl/" + f.Filename
}