mirror of
https://github.com/golang/go
synced 2024-11-06 08:16:11 -07:00
b4f3f03986
The code to serve the golang.org website has been moved to the golang.org/x/website sub-repository. x/website has become the canonical source of the golang.org website as of CL 162157, and so this code can be removed from here now. This has the benefit of removing some external dependencies that were only used by the website in production mode, and in turn enabling x/tools to be a smaller tools-related module. In future changes, the golang.org/x/tools/cmd/godoc command will be reduced in scope to be a tool for serving Go package documentation only, not the rest of the golang.org website. Run go mod tidy (using Go 1.12 RC 1). Updates golang/go#29206 Updates golang/go#29981 Change-Id: I61fd25627d0506901b04688dea8d8c9da9fe8f04 Reviewed-on: https://go-review.googlesource.com/c/162400 Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Channing Kimble-Brown <channing@golang.org> Run-TryBot: Bryan C. Mills <bcmills@google.com>
15 lines
440 B
Go
15 lines
440 B
Go
// Copyright 2014 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package main
|
|
|
|
import "net/http"
|
|
|
|
// Register a redirect handler for /dl/ to the golang.org download page.
|
|
// This file will not be included when deploying godoc to golang.org.
|
|
|
|
func init() {
|
|
http.Handle("/dl/", http.RedirectHandler("https://golang.org/dl/", http.StatusFound))
|
|
}
|