This is a created article in which the information may have evolved or changed.
Clarify the meaning of a few parameters in the Golang before the understanding of the error, causing yourself to write the path of some problems have been confused for a long time hereby record
Os. ARGS[0] This parameter is not what the project execution path gets is the first sentence of the command-line execution statement with a space-delimited delimiter that has no relation to the project execution path---it's a shame to understand wrong.
Os. GETWD () Gets the path where you are currently running
For example, in the/etc directory to run the/usr/main file eventually obtained by the GETWD value is/etc
The relative path in Golang is relative to this execution path.
That explains my go run and Idea startup, and the reason why the supervisor startup is not always found because the execution path is not necessarily the same.
So the general thing I do now is if go run directly into the directory underground go Run
If idea and supervisor are started, add a more project path parameter to the command line