<#18762 Go build constraints> New discussion creat...
# github-notifications
c
#18762 Go build constraints New discussion created by joneshf Is it possible to specify build constraints to the go compiler with Pants? For example, if I have a file `foo.go`:
Copy code
//go:build sometimes
package foo
The go compiler will only include that file in the build if I specify the
sometimes
build tag:
Copy code
$ go build -tags=sometimes ./...
I couldn't see a way to specify the
-tags
flag, so this might be a feature request. But figured I'd make a discussion first, in case I missed how to do it. pantsbuild/pants