Using IntelliJ as the ide of golang


intelliJJava is the development tool, a very useful ide,Android StudioIt’s based onintelliJChange, choose to useintelliJAsGolangIDE is very convenient.

Download IntelliJ

First, download it
intelliJIt is divided into community version and professional version. It is recommended to use professional version. If you don’t want to pay for it for the time being, you can also consider realizing the community version first. It is free for you to do itGolangperhapsJavaThe impact of development is small, but using the community versionintelliJWant to develophtml,cssandJavaScriptIt’s not that convenient.

Install the golang plug-in

GolangPlug in is an open source project…

stayintelliJOfPluginsYou can find it in the libraryGolangThe plug-in can be downloaded directly. But most of the time, because we all know, we may not be able to search, or we may not be able to download. In this case, we can go to the official website to download the correspondingJar packageThen install it manually.

Plug in address:
Download the latest version ofGolangplug-in unit.
choiceinstall plugin form diskAfter installation, you can seeGolangplug-in unit:

Configure go SDK

It has been set inGOPATHIn this case,intelliJWill automatically find the go language directory, if you can not find their own configuration
perferences->Languages&Frameworks->Go->Go LibrariesAs you can seeGOPATHConfiguration:

You can see how to use the system directlyGOPATH, or in the+Choose fromGOPATHThe location of the car.


To create a new project, select go language:

new filemain.go, input code:

    package main
    import "fmt"
    func main(){
        fmt.Println("hello go")

The output results are as follows

hello go

Recommended Today

[rust] basic data type

This article introduces the built-in data types provided by rust. Boolean type Boolean typeLogical values representing yes and No. It has two values:trueandfalseGenerally used in logical expressions, and, or, and not operations can be performed: fn main() { let x = true; let y: bool = ! x; // False, inverse operation let z = […]