So I am trying to compile some older Go code. The main.go file uses a bunch of other packages that I have locally on within the directory. The issue is go sees it as a go module and wants it to be in a repository. I don’t understand why this is necessary if I have all the code I need locally. The error looks something like this.
main.go:19:2: no required module provides package testing.com/diagnostics; to add it:
go get testing.com/diagnostics
i run using “go build main.go”.
when I change my import path to GO111MODULE=off. Everything compiles. However, I can not do this for my embedded linux project that includes go to compile this code.
Andrew Eblen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2