I am migrating to using Go modules with Go v1.13.4, and have hit a weird problem with importing packages from a local private repository.
The project structure consists of two library modules, each of which has its own Git repository in our company Gitea server. mycompany.com├── libraryA├── ├── go.mod├── ├── various .go files├── libraryB├── ├── go.mod├── ├── various .go files├── ├── test├── ├── ├── main.go├── applicationC├── ├── go.mod├── ├── various .go files Library B makes use of features in library A, and so imports library A. Application C makes use of both library A and library B I have set GOPRIVATE=mycompany.com, and enabled an authentication helper, so that the Go tools can correctly extract packages from the private Gitea server, while still pulling public packages from GitHub and so on. The symptoms are as follows: 1. Typing "go build ." and "go test ." in root of library A both work fine. 2. Typing "go test ." in root of library B works fine 3. Typing "go build ." in test sub-folder of library B works fine 4. Typing "go build ." in root of application C works fine 5. Typing "go build ." in root library B FAILS with an error message , saying "cannot find package" at every point where library B Go files attempt to import library A via import "mycompany.com/libraryA" What's weird is that identical import statements in Go files that are part of the test package (ie with a _test suffix), or in application C work fine. I have also tried "go mod verify" and that reports "all modules verified". Any suggestions as to what is going on, and how to resolve it? Thanks Sandy -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/36252cc7-5b77-43c6-a1e6-7c136c6ea9e6%40googlegroups.com.