1
0
mirror of https://github.com/golang/go synced 2024-11-18 11:14:39 -07:00

go/buildutil: Fix example code for TagsFlag.

The example incorrectly used buildutil.TagsDoc identifier which does not
exist. It should be buildutil.TagsFlagDoc instead.

The issue was introduced in https://golang.org/cl/9172 when this code was
first written.

Also use more idiomatic style for Go comments, '//' followed by a space,
then tab (instead of skipping the space). Although both render correctly
in godoc, this form is more correct and consistent.

Change-Id: I3b3c9767fe313106a8ff81e7887f3241c5806b59
Reviewed-on: https://go-review.googlesource.com/16743
Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Dmitri Shuralyov 2015-11-08 19:14:07 -08:00 committed by Alan Donovan
parent 4b07c5ce8a
commit 747ae2594e

View File

@ -16,7 +16,7 @@ const TagsFlagDoc = "a list of `build tags` to consider satisfied during the bui
// See $GOROOT/src/cmd/go/doc.go for description of 'go build -tags' flag.
//
// Example:
// flag.Var((*buildutil.TagsFlag)(&build.Default.BuildTags), "tags", buildutil.TagsDoc)
// flag.Var((*buildutil.TagsFlag)(&build.Default.BuildTags), "tags", buildutil.TagsFlagDoc)
type TagsFlag []string
func (v *TagsFlag) Set(s string) error {