go-lang-plugin-org / go-lang-idea-plugin

Google Go language IDE built using the IntelliJ Platform
https://plugins.jetbrains.com/plugin/5047
Other
4.56k stars 570 forks source link

Could not open *.xml file #2842

Closed ljgsonx closed 7 years ago

ljgsonx commented 7 years ago

this is the code in my project to load xml file

log4go.LoadConfiguration("sysconf/log.xml")

the path of xml:

projectName/src/sysconf/log.xml

In this situation, the xml file cannot be found, but when i try to add "src/" before the path, it can be found successfully:

log4go.LoadConfiguration("src/sysconf/log.xml")

this is not the real way to solve this problem,because other developer is working with liteide which don't have this problem,I do not know how it is caused, On the face of it, It doesn't go into "src" to find xml file. Can you help me to solve this problem? Thank you a lot

dlsniper commented 7 years ago

Hi,

Please use a Go Application runner and specify the working directory for it. This is not a problem of the plugin but of how the go run works. Let me know if you have any issues and I'll try and guide you to solve this.

ljgsonx commented 7 years ago

@dlsniper Thank you for your prompt reply, It works when I add "src" in the working directory, Thanks again!!!

dlsniper commented 7 years ago

You're welcome, happy to help and glad it worked out!