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:
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
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