$ go version
1.13.3
I have a folder structure as follows:
GOPATH
+---src
+--- my-api-server
+--- my-auth-server
+--- main.go
+--- my-utils
+--- uuid
+--- uuid.go
my-auth-server
uses my-api-server/my-utils/uuid
as a depenency
Now, when I used the GOPATH based module system, this worked fine. But when using go modules, when I run go run main.go
in my-auth-server
it returned error:
build command-line-arguments: cannot load my-api-server/my-utils/uuid: malformed module path "my-api-server/my-utils/uuid": missing dot in first path element
Any idea how to solve this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…