GO in IntelliJ IDEA. Multiple File and Error Undefined: Data

前端 未结 4 2106
你的背包
你的背包 2021-02-02 17:25

I want use IntelliJ IDE Community Edition to write code in GO (GoLang). I instaled right plugin, and instaled all need tools to build applicati

4条回答
  •  情话喂你
    2021-02-02 18:11

    You can add second file (in your case Data.go) as Go tool arguments field in Run/Debug Configurations. I read about this here: https://github.com/go-lang-plugin-org/go-lang-idea-plugin/issues/2013 near the end of discussion. Example below (I used 2 files HelGo.go and aaa.go) worked for me:

    Go Run Configuration with 2 files

    Intellij objected in these 2 files were in different folders, and so both of them has to be same package (main). On the other side I couldn't make any advises on this page work at all.

提交回复
热议问题