解决Go语言在eclipse中运行报Resource doesn’t have a corresponding Go Package问题

新建一个Go Project之后,并且写了一个示例,报:

Resource doesn't have a corresponding Go Package

经过排查是因为Go项目的目录结构导致的,标准应为$GOPATH/src/project_name/xxx.go

处理方案

新创建一个子文件夹并且放置go语言文件即可

文章来源:

Author:ancongcong
link:https://www.congcong.us/post/go_eclipse_resource_doesn_t_have_a_corresponding_go_package_problem.htm