Check out example codes for "visual studio code you are neither in a module nor in your gopath". It will help you in understanding the concepts better.

Code Example 1

# for windows before starting visual studio code : 
set GO111MODULE=on

Learn ReactJs, React Native from akashmittal.com