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
+18.3k Golang : Check if os.Stdin input data is piped or from terminal
+9.1k Golang : Get login name from environment and prompt for password
+4.8k Golang : Use NLP to get sentences for each paragraph example
+4.7k Swift : Get substring with rangeOfString() function example
+12.9k Golang : Google Drive API upload and rename example
+9.1k Golang : How to tokenize source code with text/scanner package?
+23.5k Golang : convert rune to integer value
+21.1k Golang : How to read JPG(JPEG), GIF and PNG files ?
+4.5k Golang : Intercept, inject and replay HTTP traffics from web server
+14.5k Golang : Loop each day of the current month example
+13k Golang : Send email with attachment(RFC2822) using Gmail API example
+4.6k Golang : What is StructTag and how to get StructTag's value?