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
+9.7k Golang : Removes punctuation or defined delimiter from the user's input
+16k Golang : When to use init() function?
+9.8k Golang : Characters limiter example
+9.3k RPM : error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
+19.8k Golang : Sort and reverse sort a slice of strings
+9.6k PHP : Convert(cast) bigInt to string
+12.4k Golang : Reverse IP address for reverse DNS lookup example
+35.2k Golang : Convert(cast) int64 to string
+13.9k Golang : rune literal not terminated error
+5.1k Golang : Process non-XML/JSON formatted ASCII text file example
+8.6k Golang : Sort and reverse sort a slice of floats