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
+5k Golang : Print instead of building pyramids
+8.7k Golang : Gaussian blur on image and camera video feed examples
+15.7k Golang : Update database with GORM example
+6.8k Golang : Calculate BMI and risk category
+16.2k Golang : How to implement two-factor authentication?
+6.1k Golang : Test input string for unicode example
+10.7k Nginx : TLS 1.2 support
+18.6k Golang : Delete duplicate items from a slice/array
+14.8k Golang : package is not in GOROOT during compilation
+11.4k Get form post value in Go
+29.2k Golang : Login(Authenticate) with Facebook example
+7k Golang : Check if one string(rune) is permutation of another string(rune)