這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。
很多Java同學都是使用IDEA的,當然也可以直接使用 Gogland至少現在還是免費。誰也不知道什麼時候又要收費了。所以我們選擇了IDEA使用外掛程式方式支援Golang的開發。老的IDEA很容易出現“The selected directory is not a valid home for Go SDK”,比如我的15.0.1版本。。查看了外掛程式文檔。
Supported IDEsThe plugin can be installed on following IntelliJ-based:IntelliJ 2016.1+ (Ultimate or Community)WebStorm 2016.1+PhpStorm 2016.1+PyCharm 2016.1+RubyMine 2016.1+CLion 2016.1+Android Studio 1.2.1+Pre-release builds are available in two forms: nightly and alphas. Alpha builds are usually released at the beginning of every week while nightly builds are released every night.To use them do the following:Use the instructionsPaste the URL for the version you need:alpha: https://plugins.jetbrains.com/plugins/alpha/5047nightly: https://plugins.jetbrains.com/plugins/nightly/5047NOTE The above links are not meant to be used in browsers, so don't report issues about them not working or being inaccessible unless there's an error in the IDE itself.Since these are not stable releases, some things might not work as expected.
發現外掛程式已經不支援15版本了。只要升級IDEA就可以了,怎麼樣升級?怎麼樣破解?請自行百度把!理論上15是可以支援golang 1.4之前的,但是誰還在使用呢?