英文:
How to run the whole project in GoLand?
问题
我有一个由几个.go文件组成的小项目。当我运行main.go时,只有它被编译,其他文件都没有被编译,所以我的应用程序崩溃了。我知道我需要在运行 -> 编辑配置中更改设置,但不知道具体该怎么做。IDE也无法看到预编译的终端包,所以“包”选项而不是“文件”选项无法工作。
英文:
I have a small project with several .go files. When I run main.go only this compiles but nothing else, so my application crushes. I understand that I have to change settings in Run -> Edit Configurations, but don't know what to do exactly. IDE also doesn’t see terminal pre-compiled package, so "Package" option instead of "File" doesn't work.
答案1
得分: 20
要运行整个项目,你需要点击“运行” -> “编辑配置”,将“运行类型”设置为“包”并在“包”字段中输入你的项目目录名称。
英文:
To run the whole project you have to go Run -> Edit Configuration, set Run Kind to Package and type in field Package your project directory name.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论