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
+5.5k How to check with curl if my website or the asset is gzipped ?
+33.9k Golang : Call a function after some delay(time.Sleep and Tick)
+46.6k Golang : Marshal and unmarshal json.RawMessage struct example
+5.6k PHP : Convert CSV to JSON with YQL example
+9.5k Facebook : Getting the friends list with PHP return JSON format
+27.7k PHP : Convert(cast) string to bigInt
+29.9k Golang : Get and Set User-Agent examples
+30.4k Golang : How to redirect to new page with net/http?
+11.6k Android Studio : Create custom icons for your application example
+5.9k Cash Flow : 50 days to pay your credit card debt
+10k CodeIgniter : Load different view for mobile devices