How to structure my folders / files to have workspace in the ‘go’ folder integrate with git in my ‘Go’ folder ?
There are multiple practices out there about how to keep your files and directories when it comes go workspace. You can find them all over the internet but the best and the standard structure is to made dedicated path for go workspace and add that path in GOPATH and then have three directories in your GOPATH name:
That is the legacy method, now I use the go.mod method by initializing a go.mod file in my cloned repo.
No longer need to setup a go workspace with the three folders, and to set GOPATH / GOBIN.
Yes very true, that was a legacy method and with current version you can go with different dependancy managers like Go modules and Deo and all . But it still a practice in use to have src folder in GOPATH to make thing easier and compatible with different way of usage of Golang .
But yes you can make thing work in whatever way you want to .