How to run the whole project in GoLand?

huangapple go评论88阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2016年12月28日 23:49:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/41365400.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定