Check out example codes for "golang build tag". It will help you in understanding the concepts better.

Code Example 1

//+build build_on_this_tag !not_on_this

package somePackage

// ...code...

// Use:
// go build -tags build_on_this_tag
// more info https://golang.org/pkg/go/build/

Learn ReactJs, React Native from akashmittal.com