all: fix doc URLs, make consistent

By fixing the generator and:

$ go install ./internal/genv && (for X in $(find . -type d -name 'go*' | perl -npe "s/^..//" ); do genv $X; done)

Change-Id: I93b37ef1ba506047a978cf319a737dab2d542260
Reviewed-on: https://go-review.googlesource.com/130977
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/go1.10.1/main.go b/go1.10.1/main.go
index 1c66143..b5dd3e1 100644
--- a/go1.10.1/main.go
+++ b/go1.10.1/main.go
@@ -9,10 +9,10 @@
 //     $ go get golang.org/dl/go1.10.1
 //     $ go1.10.1 download
 //
-// And then use the go1.10.1 command as if it were your normal
-// go command.
+// And then use the go1.10.1 command as if it were your normal go
+// command.
 //
-// See the release notes at https://golang.org/doc/devel/release.html#go1.10.minor
+// See the release notes at https://golang.org/doc/go1.10
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.10.2/main.go b/go1.10.2/main.go
index ceecb46..e4a6573 100644
--- a/go1.10.2/main.go
+++ b/go1.10.2/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.10.2 command runs the go command from go1.10.2.
+// The go1.10.2 command runs the go command from Go 1.10.2.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.10.2 command as if it were your normal go
 // command.
 //
-// See the release notes at https://golang.org/doc/go1.10.2
+// See the release notes at https://golang.org/doc/go1.10
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.10.3/main.go b/go1.10.3/main.go
index 8ab2684..7d16c0d 100644
--- a/go1.10.3/main.go
+++ b/go1.10.3/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.10.3 command runs the go command from go1.10.3.
+// The go1.10.3 command runs the go command from Go 1.10.3.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.10.3 command as if it were your normal go
 // command.
 //
-// See the release notes at https://golang.org/doc/go1.10.3
+// See the release notes at https://golang.org/doc/go1.10
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.10/main.go b/go1.10/main.go
new file mode 100644
index 0000000..318e2dd
--- /dev/null
+++ b/go1.10/main.go
@@ -0,0 +1,24 @@
+// Copyright 2018 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.
+
+// The go1.10 command runs the go command from Go 1.10.
+//
+// To install, run:
+//
+//     $ go get golang.org/dl/go1.10
+//     $ go1.10 download
+//
+// And then use the go1.10 command as if it were your normal go
+// command.
+//
+// See the release notes at https://golang.org/doc/go1.10
+//
+// File bugs at https://golang.org/issues/new
+package main
+
+import "golang.org/dl/internal/version"
+
+func main() {
+	version.Run("go1.10")
+}
diff --git a/go1.10beta1/main.go b/go1.10beta1/main.go
index 035a333..699fcd9 100644
--- a/go1.10beta1/main.go
+++ b/go1.10beta1/main.go
@@ -1,8 +1,8 @@
-// Copyright 2017 The Go Authors. All rights reserved.
+// Copyright 2018 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.
 
-// The go1.10beta1 command runs the go command from go1.10beta1.
+// The go1.10beta1 command runs the go command from Go 1.10beta1.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.10beta1 command as if it were your normal go
 // command.
 //
-// See the release notes at https://beta.golang.org/doc/go1.10
+// See the release notes at https://tip.golang.org/doc/go1.10
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.10beta2/main.go b/go1.10beta2/main.go
index 3aa8027b..b7b631e 100644
--- a/go1.10beta2/main.go
+++ b/go1.10beta2/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.10beta2 command runs the go command from go1.10beta2.
+// The go1.10beta2 command runs the go command from Go 1.10beta2.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.10beta2 command as if it were your normal go
 // command.
 //
-// See the release notes at https://beta.golang.org/doc/go1.10
+// See the release notes at https://tip.golang.org/doc/go1.10
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.10rc1/main.go b/go1.10rc1/main.go
index 5357da5..8e72f2c 100644
--- a/go1.10rc1/main.go
+++ b/go1.10rc1/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.10rc1 command runs the go command from go1.10rc1.
+// The go1.10rc1 command runs the go command from Go 1.10rc1.
 //
 // To install, run:
 //
diff --git a/go1.10rc2/main.go b/go1.10rc2/main.go
index b168e4b..d1e9034 100644
--- a/go1.10rc2/main.go
+++ b/go1.10rc2/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.10rc2 command runs the go command from go1.10rc2.
+// The go1.10rc2 command runs the go command from Go 1.10rc2.
 //
 // To install, run:
 //
diff --git a/go1.11beta1/main.go b/go1.11beta1/main.go
index ab7ee8e..be39e43 100644
--- a/go1.11beta1/main.go
+++ b/go1.11beta1/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.11beta1 command runs the go command from go1.11beta1.
+// The go1.11beta1 command runs the go command from Go 1.11beta1.
 //
 // To install, run:
 //
diff --git a/go1.11beta2/main.go b/go1.11beta2/main.go
index cc89693..3b10093 100644
--- a/go1.11beta2/main.go
+++ b/go1.11beta2/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.11beta2 command runs the go command from go1.11beta2.
+// The go1.11beta2 command runs the go command from Go 1.11beta2.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.11beta2 command as if it were your normal go
 // command.
 //
-// See the release notes at https://golang.org/doc/go1.11beta2
+// See the release notes at https://tip.golang.org/doc/go1.11
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.11beta3/main.go b/go1.11beta3/main.go
index 860e117..b26f079 100644
--- a/go1.11beta3/main.go
+++ b/go1.11beta3/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.11beta3 command runs the go command from go1.11beta3.
+// The go1.11beta3 command runs the go command from Go 1.11beta3.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.11beta3 command as if it were your normal go
 // command.
 //
-// See the release notes at https://golang.org/doc/go1.11beta3
+// See the release notes at https://tip.golang.org/doc/go1.11
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.11rc1/main.go b/go1.11rc1/main.go
index 5e282a9..653eadb 100644
--- a/go1.11rc1/main.go
+++ b/go1.11rc1/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.11rc1 command runs the go command from go1.11rc1.
+// The go1.11rc1 command runs the go command from Go 1.11rc1.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.11rc1 command as if it were your normal go
 // command.
 //
-// See the release notes at https://golang.org/doc/go1.11
+// See the release notes at https://tip.golang.org/doc/go1.11
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.11rc2/main.go b/go1.11rc2/main.go
index 87f4432..65302c1 100644
--- a/go1.11rc2/main.go
+++ b/go1.11rc2/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.11rc2 command runs the go command from go1.11rc2.
+// The go1.11rc2 command runs the go command from Go 1.11rc2.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.11rc2 command as if it were your normal go
 // command.
 //
-// See the release notes at https://golang.org/doc/go1.11rc2
+// See the release notes at https://tip.golang.org/doc/go1.11
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.8.1/main.go b/go1.8.1/main.go
index 149124c..b8d2374 100644
--- a/go1.8.1/main.go
+++ b/go1.8.1/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.8.1 command runs the go command from go1.8.1.
+// The go1.8.1 command runs the go command from Go 1.8.1.
 //
 // To install, run:
 //
diff --git a/go1.8.2/main.go b/go1.8.2/main.go
index 4f12699..0f55ba0 100644
--- a/go1.8.2/main.go
+++ b/go1.8.2/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.8.2 command runs the go command from go1.8.2.
+// The go1.8.2 command runs the go command from Go 1.8.2.
 //
 // To install, run:
 //
diff --git a/go1.8.3/main.go b/go1.8.3/main.go
index 297a2a0..d371d58 100644
--- a/go1.8.3/main.go
+++ b/go1.8.3/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.8.3 command runs the go command from go1.8.3.
+// The go1.8.3 command runs the go command from Go 1.8.3.
 //
 // To install, run:
 //
diff --git a/go1.8.4/main.go b/go1.8.4/main.go
index 85013c3..307e9e5 100644
--- a/go1.8.4/main.go
+++ b/go1.8.4/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.8.4 command runs the go command from go1.8.4.
+// The go1.8.4 command runs the go command from Go 1.8.4.
 //
 // To install, run:
 //
diff --git a/go1.8.5/main.go b/go1.8.5/main.go
index 9b073a7..9b4ef2d 100644
--- a/go1.8.5/main.go
+++ b/go1.8.5/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.8.5 command runs the go command from go1.8.5.
+// The go1.8.5 command runs the go command from Go 1.8.5.
 //
 // To install, run:
 //
diff --git a/go1.8.6/main.go b/go1.8.6/main.go
index 7ce24df..f845876 100644
--- a/go1.8.6/main.go
+++ b/go1.8.6/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.8.6 command runs the go command from go1.8.6.
+// The go1.8.6 command runs the go command from Go 1.8.6.
 //
 // To install, run:
 //
diff --git a/go1.8.7/main.go b/go1.8.7/main.go
index 5374562..5ca105e 100644
--- a/go1.8.7/main.go
+++ b/go1.8.7/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.8.7 command runs the go command from go1.8.7.
+// The go1.8.7 command runs the go command from Go 1.8.7.
 //
 // To install, run:
 //
diff --git a/go1.8/main.go b/go1.8/main.go
index 5c6d564..5cefd8f 100644
--- a/go1.8/main.go
+++ b/go1.8/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.8 command runs the go command from go1.8.
+// The go1.8 command runs the go command from Go 1.8.
 //
 // To install, run:
 //
diff --git a/go1.8beta1/main.go b/go1.8beta1/main.go
index 04320d5..50823ba 100644
--- a/go1.8beta1/main.go
+++ b/go1.8beta1/main.go
@@ -1,8 +1,8 @@
-// Copyright 2016 The Go Authors. All rights reserved.
+// Copyright 2018 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.
 
-// The go1.8beta1 command runs the go command from go1.8beta1.
+// The go1.8beta1 command runs the go command from Go 1.8beta1.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.8beta1 command as if it were your normal go
 // command.
 //
-// See the release notes at https://beta.golang.org/doc/go1.8
+// See the release notes at https://tip.golang.org/doc/go1.8
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.8beta2/main.go b/go1.8beta2/main.go
index f4c2389..be8f2b9 100644
--- a/go1.8beta2/main.go
+++ b/go1.8beta2/main.go
@@ -1,8 +1,8 @@
-// Copyright 2016 The Go Authors. All rights reserved.
+// Copyright 2018 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.
 
-// The go1.8beta2 command runs the go command from go1.8beta2.
+// The go1.8beta2 command runs the go command from Go 1.8beta2.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.8beta2 command as if it were your normal go
 // command.
 //
-// See the release notes at https://beta.golang.org/doc/go1.8
+// See the release notes at https://tip.golang.org/doc/go1.8
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.8rc1/main.go b/go1.8rc1/main.go
index 4a62bbc..9a602ae 100644
--- a/go1.8rc1/main.go
+++ b/go1.8rc1/main.go
@@ -1,8 +1,8 @@
-// Copyright 2016 The Go Authors. All rights reserved.
+// Copyright 2018 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.
 
-// The go1.8rc1 command runs the go command from go1.8rc1.
+// The go1.8rc1 command runs the go command from Go 1.8rc1.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.8rc1 command as if it were your normal go
 // command.
 //
-// See the release notes at https://beta.golang.org/doc/go1.8
+// See the release notes at https://tip.golang.org/doc/go1.8
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.8rc2/main.go b/go1.8rc2/main.go
index d8b2099..e5bc606 100644
--- a/go1.8rc2/main.go
+++ b/go1.8rc2/main.go
@@ -1,8 +1,8 @@
-// Copyright 2016 The Go Authors. All rights reserved.
+// Copyright 2018 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.
 
-// The go1.8rc2 command runs the go command from go1.8rc2.
+// The go1.8rc2 command runs the go command from Go 1.8rc2.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.8rc2 command as if it were your normal go
 // command.
 //
-// See the release notes at https://beta.golang.org/doc/go1.8
+// See the release notes at https://tip.golang.org/doc/go1.8
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.8rc3/main.go b/go1.8rc3/main.go
index b1197fc..346429b 100644
--- a/go1.8rc3/main.go
+++ b/go1.8rc3/main.go
@@ -1,8 +1,8 @@
-// Copyright 2016 The Go Authors. All rights reserved.
+// Copyright 2018 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.
 
-// The go1.8rc3 command runs the go command from go1.8rc3.
+// The go1.8rc3 command runs the go command from Go 1.8rc3.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.8rc3 command as if it were your normal go
 // command.
 //
-// See the release notes at https://beta.golang.org/doc/go1.8
+// See the release notes at https://tip.golang.org/doc/go1.8
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.9.1/main.go b/go1.9.1/main.go
index 075f867..c441f2a 100644
--- a/go1.9.1/main.go
+++ b/go1.9.1/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.9.1 command runs the go command from go1.9.1.
+// The go1.9.1 command runs the go command from Go 1.9.1.
 //
 // To install, run:
 //
diff --git a/go1.9.2/main.go b/go1.9.2/main.go
index cb3c755..441f540 100644
--- a/go1.9.2/main.go
+++ b/go1.9.2/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.9.2 command runs the go command from go1.9.2.
+// The go1.9.2 command runs the go command from Go 1.9.2.
 //
 // To install, run:
 //
diff --git a/go1.9.3/main.go b/go1.9.3/main.go
index 28f48cb..e164f21 100644
--- a/go1.9.3/main.go
+++ b/go1.9.3/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.9.3 command runs the go command from go1.9.3.
+// The go1.9.3 command runs the go command from Go 1.9.3.
 //
 // To install, run:
 //
diff --git a/go1.9.4/main.go b/go1.9.4/main.go
index 6d74de5..e47eae8 100644
--- a/go1.9.4/main.go
+++ b/go1.9.4/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.9.4 command runs the go command from go1.9.4.
+// The go1.9.4 command runs the go command from Go 1.9.4.
 //
 // To install, run:
 //
diff --git a/go1.9.5/main.go b/go1.9.5/main.go
index 93c97d1..25fb6c0 100644
--- a/go1.9.5/main.go
+++ b/go1.9.5/main.go
@@ -9,10 +9,10 @@
 //     $ go get golang.org/dl/go1.9.5
 //     $ go1.9.5 download
 //
-// And then use the go1.9.5 command as if it were your normal
-// go command.
+// And then use the go1.9.5 command as if it were your normal go
+// command.
 //
-// See the release notes at https://golang.org/doc/devel/release.html#go1.9.minor
+// See the release notes at https://golang.org/doc/go1.9
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.9.6/main.go b/go1.9.6/main.go
index 48eeaeb..e651dfe 100644
--- a/go1.9.6/main.go
+++ b/go1.9.6/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.9.6 command runs the go command from go1.9.6.
+// The go1.9.6 command runs the go command from Go 1.9.6.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.9.6 command as if it were your normal go
 // command.
 //
-// See the release notes at https://golang.org/doc/go1.9.6
+// See the release notes at https://golang.org/doc/go1.9
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.9.7/main.go b/go1.9.7/main.go
index 514a606..f87987b 100644
--- a/go1.9.7/main.go
+++ b/go1.9.7/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.9.7 command runs the go command from go1.9.7.
+// The go1.9.7 command runs the go command from Go 1.9.7.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.9.7 command as if it were your normal go
 // command.
 //
-// See the release notes at https://golang.org/doc/go1.9.7
+// See the release notes at https://golang.org/doc/go1.9
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.9/main.go b/go1.9/main.go
index 49e2e15..576072c 100644
--- a/go1.9/main.go
+++ b/go1.9/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The go1.9 command runs the go command from go1.9.
+// The go1.9 command runs the go command from Go 1.9.
 //
 // To install, run:
 //
diff --git a/go1.9beta1/main.go b/go1.9beta1/main.go
index 5c339df..9031f98 100644
--- a/go1.9beta1/main.go
+++ b/go1.9beta1/main.go
@@ -1,8 +1,8 @@
-// Copyright 2017 The Go Authors. All rights reserved.
+// Copyright 2018 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.
 
-// The go1.9beta1 command runs the go command from go1.9beta1.
+// The go1.9beta1 command runs the go command from Go 1.9beta1.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.9beta1 command as if it were your normal go
 // command.
 //
-// See the release notes at https://beta.golang.org/doc/go1.9
+// See the release notes at https://tip.golang.org/doc/go1.9
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.9beta2/main.go b/go1.9beta2/main.go
index c887378..2a63e1d 100644
--- a/go1.9beta2/main.go
+++ b/go1.9beta2/main.go
@@ -1,8 +1,8 @@
-// Copyright 2017 The Go Authors. All rights reserved.
+// Copyright 2018 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.
 
-// The go1.9beta2 command runs the go command from go1.9beta2.
+// The go1.9beta2 command runs the go command from Go 1.9beta2.
 //
 // To install, run:
 //
@@ -12,7 +12,7 @@
 // And then use the go1.9beta2 command as if it were your normal go
 // command.
 //
-// See the release notes at https://beta.golang.org/doc/go1.9
+// See the release notes at https://tip.golang.org/doc/go1.9
 //
 // File bugs at https://golang.org/issues/new
 package main
diff --git a/go1.9rc1/main.go b/go1.9rc1/main.go
index 5e01704..3dbcd02 100644
--- a/go1.9rc1/main.go
+++ b/go1.9rc1/main.go
@@ -1,8 +1,8 @@
-// Copyright 2017 The Go Authors. All rights reserved.
+// Copyright 2018 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.
 
-// The go1.9rc1 command runs the go command from go1.9rc1.
+// The go1.9rc1 command runs the go command from Go 1.9rc1.
 //
 // To install, run:
 //
diff --git a/go1.9rc2/main.go b/go1.9rc2/main.go
index 0a267d8..7301d58 100644
--- a/go1.9rc2/main.go
+++ b/go1.9rc2/main.go
@@ -1,8 +1,8 @@
-// Copyright 2017 The Go Authors. All rights reserved.
+// Copyright 2018 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.
 
-// The go1.9rc2 command runs the go command from go1.9rc2.
+// The go1.9rc2 command runs the go command from Go 1.9rc2.
 //
 // To install, run:
 //
diff --git a/internal/genv/main.go b/internal/genv/main.go
old mode 100755
new mode 100644
index 1f32863..ea093a7
--- a/internal/genv/main.go
+++ b/internal/genv/main.go
@@ -13,6 +13,7 @@
 	"os"
 	"os/exec"
 	"path/filepath"
+	"regexp"
 	"strings"
 	"time"
 )
@@ -32,14 +33,23 @@
 		}
 		var buf bytes.Buffer
 		if err := mainTmpl.Execute(&buf, struct {
-			Year    int
-			Version string
-		}{time.Now().Year(), version}); err != nil {
+			Year                int
+			Version             string // "go1.5.3rc2"
+			VersionNoPatch      string // "go1.5"
+			CapitalSpaceVersion string // "Go 1.5"
+			DocHost             string // "golang.org" or "tip.golang.org" for rc/beta
+		}{
+			Year:                time.Now().Year(),
+			Version:             version,
+			VersionNoPatch:      versionNoPatch(version),
+			DocHost:             docHost(version),
+			CapitalSpaceVersion: strings.Replace(version, "go", "Go ", 1),
+		}); err != nil {
 			failf("mainTmpl.execute: %v", err)
 		}
 		path := filepath.Join(os.Getenv("GOPATH"), "src/golang.org/dl", version, "main.go")
-		if err := os.Mkdir(filepath.Dir(path), 0755); err != nil {
-			failf("os.Mkdir: %v", err)
+		if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
+			failf("%v", err)
 		}
 		if err := ioutil.WriteFile(path, buf.Bytes(), 0666); err != nil {
 			failf("ioutil.WriteFile: %v", err)
@@ -51,6 +61,22 @@
 	}
 }
 
+func docHost(ver string) string {
+	if strings.Contains(ver, "rc") || strings.Contains(ver, "beta") {
+		return "tip.golang.org"
+	}
+	return "golang.org"
+}
+
+func versionNoPatch(ver string) string {
+	rx := regexp.MustCompile(`^(go\d+\.\d+)($|rc|beta|\.)`)
+	m := rx.FindStringSubmatch(ver)
+	if len(m) < 2 {
+		failf("unrecognized version %q", ver)
+	}
+	return m[1]
+}
+
 func failf(format string, args ...interface{}) {
 	if len(format) == 0 || format[len(format)-1] != '\n' {
 		format += "\n"
@@ -63,7 +89,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// The {{.Version}} command runs the go command from {{.Version}}.
+// The {{.Version}} command runs the go command from {{.CapitalSpaceVersion}}.
 //
 // To install, run:
 //
@@ -73,7 +99,7 @@
 // And then use the {{.Version}} command as if it were your normal go
 // command.
 //
-// See the release notes at https://golang.org/doc/{{.Version}}
+// See the release notes at https://{{.DocHost}}/doc/{{.VersionNoPatch}}
 //
 // File bugs at https://golang.org/issues/new
 package main