DEV Community

Discussion on: Advanced Go Build Techniques

Collapse
 
jacktt profile image
Jack • Edited

Yes, you are correct.
As go docs:
Go versions 1.16 and earlier used a different syntax for build constraints, with a "// +build" prefix. The gofmt command will add an equivalent //go:build constraint when encountering the older syntax.