10

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.

Caner
  • 57,267
  • 35
  • 174
  • 180
Roman
  • 459
  • 1
  • 8
  • 17

1 Answers1

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.

Roman
  • 459
  • 1
  • 8
  • 17
  • 12
    After finding this solution via Google, I had no luck because I kept trying to type `client` under _Package_ to compile all files under `~/go/src/reponame/src/client`. Turns out that my _Package_ should instead say `reponame/src/client` for it to work. – KelvZhan Feb 11 '17 at 23:57