I'll bet that `go run -tags local .` works. Because `go run` allows arguments after the package name that are passed to the program you have to specify build flags before the package name.
On Sun, Sep 13, 2020 at 8:07 PM Gert <[email protected]> wrote: > // +build local > > This works for > go build -tags local > go test -tags local > > But for some reason go run ignores the local tag? > go run . -tags local > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/071b3e6c-1bea-447c-9311-5a357f5a2e57n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/071b3e6c-1bea-447c-9311-5a357f5a2e57n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD_wCp4BMDbt8wJwXeqVL7O_5EqQwd%2BT7rSUd1wUNt4Raw%40mail.gmail.com.
