使用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文件名一样的。
版权声明:本文为lezeqe原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。
使用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文件名一样的。