Gogland : Single File versus Go Application Run Configurations
This is a follow up from the previous guide on how to place the source code files in Gogland. Thanks to the valuable tip provided by dlsniper... apparently, there is a way to fix the - "wrong way"
- of placing your source code files with Gogland IDE.
Correcting the previous guide inaccuracy..... as a matter of fact.... you still can place your files together in the main directory and run the project.
See what I mean:
The difference is that in the previous guide, the default Run Configuration
is set to "Go Single File"
.
To allow your project to invoke function from files within the same directory, all you need to do is to alter the Run Configurations
to use "Go Application"
instead of "Go Single File"
For comparison purpose and to highlight the differences:
Top - Go Application
. Bottom - Go Single File
Hope this helps and if you do have question regarding Gogland IDE do raise it up at https://youtrack.jetbrains.com/issues/Go or reach out to dlsniper
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+9k Android Studio : Simple input textbox and intercept key example
+5.1k Golang : Dealing with backquote
+10.3k Golang : Simple file scaning and remove virus example
+5.8k Golang : Get expvar(export variables) to work with multiplexer
+7.8k Golang : GMail API create and send draft with simple upload attachment example
+19.8k Golang : For loop continue,break and range
+13.4k Golang : Get URI segments by number and assign as variable example
+4.3k Golang : Issue HTTP commands to server and port example
+12.1k Facebook PHP getUser() returns 0
+10.4k SSL : The certificate is not trusted because no issuer chain was provided
+32.1k Golang : Converting a negative number to positive number