I am using VS code and mac terminal both for Go development. In the VS code, I am able to run all the related build and setup because by Go is pointing to correct version as below:
$go version
go version go1.15.6 darwin/amd64
$which go
/usr/local/go/bin/go
But in Terminal go version and GOROOT is showing something different as below:
$go version
go1.16 darwin/amd64
$which go
/usr/local/bin/go
How to set correct path in terminal too?