My team has been developing Kubernetes operators for the last year in Go. Like everyone else, we’ve had no shortage of go mod frustration. Long story short, we are using go 1.12 and go modules. (it’s the closest we can get to get everything working - CI/CD, IDE’s, etc…)
I was just curious how you guys approach simple stuff like this.
I’m developing an app in Go. At the same time I’m writing a utility library that application will use.
Thus, in my app:
import "github.mycompany.com/myuser/somerepo/mylibrary"
So I do some work, commit the changes to my library, push and merge.
Back in my app I write some code to use the new changes in my library and then I do a fresh “go mod download” and try and compile my app and it doesn’t see the changes in my library.
So I completely purge my go cache. (rm -rf ~/go/pkg). I “go mod download” again. I confirm my library is downloaded.
Same problem.
Can someone help me understand how Go module interacts with Git? The documentation is TERRIBLE.
How do people approach doing this? What a frustrating module management design.