Undocumented Build Constraints


(G Voice Gd) #1

//!+
//!-
//+table

The Go Book (gopl.io) code is stuffed full of such undocumented build-constraint-looking comments. There is nothing about them @ golang.org/pkg/go/build/#hdr-Build_Constraints. Any ideas on what they do; how to use them and such?


(Ivan Matmati) #2

Hi,

It just seems as build directives. You can tweak your build on basis of platform, os, etc. You determine if the files should be included in the build on these criteria.