Resource doesn't have a correspoiding Go package

88 views
Skip to first unread message

iamthuy...@gmail.com

unread,
Aug 4, 2016, 12:44:46 PM8/4/16
to goclipse
Hi,

I created a project dir like below:

-Root
      --bin
      --pkg
      --src
             --main.go

My GOPATH is set to $GOPATH, two levels above Root, when I right click on main.go and try to run as Go application, I keep getting the following error: Resource doesn't have a correspoiding Go package

I do not know why I cannot run this simple program, any help is greatly appreciated.

Thanks

brunomedeiros

unread,
Aug 8, 2016, 10:29:47 AM8/8/16
to goclipse
You can't have .go files directly under "src", you need at least one subdirectory (such as "src/myapp/main.go", so that it will be part of package "myapp"
Reply all
Reply to author
Forward
0 new messages