Error:run after build is not possible/main file has non-main package or doesn't contain main functio
使用goland写第一个demo,报错:
Error:run after build is not possible
main file has non-main package or doesn't contain main function
报错的意思是说,找不到你写的包并没有main函数。
其实呢,package不是IDE自动弹出的包,而是跟go文件名一样的。
...
原创
2019-11-30 23:42:20 ·
17034 阅读 ·
4 评论