Intermediate Go (Golang)
Q77 / 100

What is a build tag/constraint in Go?

Correct! Well done.

Incorrect.

The correct answer is B) //go:build <expression> at the top of a file to conditionally include it based on OS, architecture, or custom tags

B

Correct Answer

//go:build <expression> at the top of a file to conditionally include it based on OS, architecture, or custom tags

Explanation

//go:build linux && amd64 includes the file only when compiling for Linux on x86-64. Custom tags: //go:build integration with go test -tags integration.

Progress
77/100