Tag Archives: Golang notes

error: goland –build constraints exclude all Go files

First,// + build will gradually replace// go: build. Both annotations can be used in go version 1.16-1.18 as the transition period. See official website https://www.jetbrains.com/help/go/configuring-build-constraints-and-vendoring.html

However,// + build cannot be used in versions below 1.16. If it is used, an error will be reported: Golan — build constraints exclude all go files.

1.16 the following versions should use// go: build

And make the following settings