Skip to content

go/build: explain -tags better in the go/build documentation #8772

Closed
@gopherbot

Description

@gopherbot

by kyle.erf@10gen.com:

The help text for the "go build" command says:

    -tags 'tag list'
        a list of build tags to consider satisfied during the build.
        For more information about build tags, see the description of
        build constraints in the documentation for the go/build package.

however, nothing in the go/build documentation page
(http://golang.org/pkg/go/build/#hdr-Build_Constraints)  says anything about the
"-tags" option. There is one reference to "ctxt.BuildTags," but no
examples of actually calling "go build" with -tags set.

It would be great if the documentation included an example of using -tags to pass in
custom build constraints. As it is, there are no examples of this powerful feature,
aside from a test shell script that ships with the go source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions