Suppose I have a private github repository (called company_repo) belonging to a company I work for consisting of 3 separate Go applications and I want to use utility functions from folder util (util is basically functioning like an internal package for apps 1 through 3). I did a go mod init inside the util directory. I've tried adding github.com/company_repo/util v0.0.1 into the require directive in go.mod for app1, but unfortunately I get fatal: Could not read from remote repository.
go mod init
github.com/company_repo/util v0.0.1
go.mod
fatal: Could not read from remote repository.
. ├── app2 ├── app3 ├── README.md ├── app1 └── util
1.4m articles
1.4m replys
5 comments
57.0k users