Golang conditional compilation

后端 未结 4 486
南方客
南方客 2020-12-23 13:04

I\'ve got a trouble with conditional compilation in Go 1.

Here is my test code. Is there anything I misunderstand about the \"// +build\" constraint and the \"-tags\

4条回答
  •  星月不相逢
    2020-12-23 13:18

    You must follow // +build XXX with a blank line.

    In my brief search, I couldn't find where/if this is documented. But the source clearly calls it out

提交回复
热议问题