So I'm trying to run my go app with google's app engine. When I run goapp server
I get this error:
go-app-builder: Failed parsing input: app file model.go conflicts with same file imported from GOPATH
This is my project layout:
.
├── model
│ └── model.go
├── reqres
│ └── reqres.go
├── app.yaml
├── service.go
├── main.go
└── transport.go
If I run it without app engine I don't any get errors and the app runs fine.
According to my experience you get this error because your project folder is also under your GOPATH. "goapp" kind of clone your project folder and builds it against the go environment GOPATH and GOROOT... Doing so it finds duplicated symbols for all package that you have been declared under your project.
Here is the explanation in go appengine documentation
Under the same link you will find some advises by google for your project structure and one of them is (your project break that guideline):
If you want a repository with your application definition and go packages I encourage you to adopt the folliwing structure:
This structure is convinient and improves debugging experience as explained in the article debugging Go appengine module with visual studio code