Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run the whole project in GoLand?

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.

like image 262
Roman Avatar asked Dec 28 '16 15:12

Roman


People also ask

How do I run unit test in GoLand?

Quick wayPlace the caret at the test file to run all tests in that file, or at the test method, and press Ctrl+Shift+F10 . Alternatively, click the gutter icon next to the test method.

How do I run a debug in GoLand?

From the main menu, select Run | Edit Configurations. Alternatively, press Alt+Shift+F10 , then 0 . Select the run/debug configuration you want to share, enable the Store as project file option, and specify the location where the configuration file will be stored.


1 Answers

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.

like image 187
Roman Avatar answered Oct 16 '22 03:10

Roman