FAQ
The `go generate` design doc says "The -run flag takes a regular
expression, analogous to that of the go test subcommand, that restricts
generation to those directives whose command (see below) matches the
regular expression."
(https://docs.google.com/a/sourcegraph.com/document/d/1V03LUfjSADDooDMhe-_K59EgpTEm3V8uvQRuNMAEnjg)

However, `go generate` currently seems to ignore this flag. Looking at the
source, the generateRunFlag variable in cmd/go/generate.go is set but never
used. Is the intent still to support the -run flag? If so (and no one is
currently working on it), I can submit a simple patch.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Nigel Tao at Feb 9, 2015 at 4:13 am
    +Rob.
    On Mon, Jan 26, 2015 at 2:08 PM, wrote:
    The `go generate` design doc says "The -run flag takes a regular expression,
    analogous to that of the go test subcommand, that restricts generation to
    those directives whose command (see below) matches the regular expression."
    (https://docs.google.com/a/sourcegraph.com/document/d/1V03LUfjSADDooDMhe-_K59EgpTEm3V8uvQRuNMAEnjg)

    However, `go generate` currently seems to ignore this flag. Looking at the
    source, the generateRunFlag variable in cmd/go/generate.go is set but never
    used. Is the intent still to support the -run flag? If so (and no one is
    currently working on it), I can submit a simple patch.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Rob Pike at Feb 9, 2015 at 6:33 am
    It's an oversight. The documentation will be fixed in 1.4.2 but the feature
    won't be released until 1.5.

    -rob

    On Sun, Feb 8, 2015 at 8:12 PM, Nigel Tao wrote:

    +Rob.
    On Mon, Jan 26, 2015 at 2:08 PM, wrote:
    The `go generate` design doc says "The -run flag takes a regular
    expression,
    analogous to that of the go test subcommand, that restricts generation to
    those directives whose command (see below) matches the regular
    expression."
    (
    https://docs.google.com/a/sourcegraph.com/document/d/1V03LUfjSADDooDMhe-_K59EgpTEm3V8uvQRuNMAEnjg
    )
    However, `go generate` currently seems to ignore this flag. Looking at the
    source, the generateRunFlag variable in cmd/go/generate.go is set but never
    used. Is the intent still to support the -run flag? If so (and no one is
    currently working on it), I can submit a simple patch.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJan 26, '15 at 3:29a
activeFeb 9, '15 at 6:33a
posts3
users3
websitegolang.org

3 users in discussion

Nigel Tao: 1 post Rob Pike: 1 post Beyang: 1 post

People

Translate

site design / logo © 2021 Grokbase