Check out example codes for "go compile for raspberry pi". It will help you in understanding the concepts better.

Code Example 1

env GOOS=linux GOARCH=arm GOARM=5 go build

Learn ReactJs, React Native from akashmittal.com