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
+23.7k Golang : minus time with Time.Add() or Time.AddDate() functions to calculate past date
+13.6k Golang : Count number of runes in string
+4.7k Adding Skype actions such as call and chat into web page examples
+11.6k Golang : Generate DSA private, public key and PEM files example
+19.9k Golang : Accept input from user with fmt.Scanf skipped white spaces and how to fix it
+7.3k Golang : Of hash table and hash map
+6k Golang : Extract unicode string from another unicode string example
+6.9k Golang : Find the longest line of text example
+21k PHP : Convert(cast) int to double/float
+10.2k Golang : Identifying Golang HTTP client request
+9.6k Golang : Changing a RGBA image number of channels with OpenCV