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
+2.6k Unix/Linux : How to fix CentOS yum duplicate glibc or device-mapper-libs dependency error?
+2.5k Golang : Create new color from command line parameters
+2.6k Golang : How to calculate the distance between two coordinates using Haversine formula
+7.6k Golang : Execute function at intervals or after some delay
+3.4k Ubuntu : connect() to unix:/var/run/php5-fpm.sock failed (13: Permission denied) while connecting to upstream
+2.5k Golang : How to remove certain lines from a file
+15.1k Golang : How to validate URL the right way
+5.8k Golang : Gorilla web tool kit secure cookie example
+3.3k Golang : Add text to image and get OpenCV's X, Y co-ordinates example
+8.9k Golang : Convert slice to array
+14.4k Golang : How to Set or Add Header http.ResponseWriter?