You either need the full import path of the package to test or a simple $ go test
V. On Wednesday, 22 January 2020 10:52:41 UTC+1, pc wrote: > > Hello, > > I am setting up my go project directories to test. I have set up like > bellow > and my GOPATH is testexercise. Application builds fine, when I run > from src/github.com/arpsch/app/ > > But when I try to run go test handler from app folder, I am getting > below error . How to organize properly. > > app>$go test handler > > Error: > can't load package: package handler: cannot find package "handler" in any > of: > c:\go\src\handler (from $GOROOT) > C:\Users\pchawandi\projects\go\src\handler (from $GOPATH) > C:\Users\pchawandi\projects\app\src\handler > > Folder structure: > testexercise > ├── README.md > └── src > └── github.com > └── arpsch > └── app > ├── handler > │ ├── handler.go > │ ├── handler_test.go > │ └── testData > │ └── 1.json > ├── main.go > ├── proxy > │ └── proxy.go > ├── server > ├── utils > │ ├── utils.go > │ └── utils_test.go > -- 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/ec44b93f-5312-4d8a-8658-e676f6f1b1be%40googlegroups.com.