export GOROOT GOOS GOARCH GOBIN PATH
When I compile from vi (:make) in terminal, everything is fine. However, when I do the same from gvim (window), I was getting
fatal error: can't find import: fmt
A quick google search pointed me to this
So, gvim is not seeing those environment variables. I confirm in gvim with
Reports an empty string. So I edit $MYVIMRC (:e $MYVIMRC) and add the following
Worked like a charm!