1
0
mirror of https://github.com/golang/go synced 2024-09-30 17:28:32 -06:00

cmd/go: use current go source code when generating doc.go

Change-Id: Iad1764707d173a09467fd36e8c49a58147f12219
Reviewed-on: https://go-review.googlesource.com/4320
Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
Andrew Gerrand 2015-02-10 13:24:47 +11:00 committed by Gerrit Code Review
parent 5c4a86d0d0
commit a1dbb9201d
2 changed files with 8 additions and 4 deletions

View File

@ -310,6 +310,7 @@ The generator is run in the package's source directory.
Go generate accepts one specific flag:
-run=""
TODO: This flag is unimplemented.
if non-empty, specifies a regular expression to
select directives whose command matches the expression.

View File

@ -1,9 +1,12 @@
#!/bin/sh
#!/bin/bash
# Copyright 2012 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.
go install # So the next line will produce updated documentation.
go help documentation | sed 's; \*/; * /;' >doc.go
gofmt -w doc.go
set -e
go build -o go.latest
./go.latest help documentation | sed 's; \*/; * /;' >doc.go
gofmt -w doc.go
rm go.latest