golang and circle CI setup
My approach nowadays, always package your build process into Dockerfile. I.e. here is Dockerfile for one of my open-sourced Go projects:
https://github.com/relizaio/relizaGoClient/blob/master/Dockerfile
Note: if you're using go modules (which seems to be the case), replace RUN go get -d -v ./... with RUN go mod download in the build-stage. BTW, missing go mod instruction might be the reason for your build failure in the current setup.
Then in your CI, simply do docker build instruction, and then copy your artifact from the container if you need it outside.
Key benefit: you can verify build process against same Dockerfile locally and you can port it to any CI tool whatsoever.