Can idea use go language?

青灯夜游
Release: 2022-12-20 12:34:53
Original
8940 people have browsed it

Idea can use go language. Configuration method: 1. Open IDEA, remove and click "File"-"Settings"-"Plugins"; 2. Click and open "Browse repositories", search for go, and click "Install" to install the go plug-in; 3. Restart IDEA; 4. Click "File"-"Settings"-"Languages&Frameworks"-"Go" in sequence; 5. Configure GOROOT and GOPATH.

Can idea use go language?

The operating environment of this tutorial: Windows 7 system, GO version 1.18, Dell G3 computer.

Idea can use go language, but you need to install plug-ins and configure the environment.

IDEA configures the Go language development environment

##1. Add Go plug-in <span style="font-size: 16px;"></span>

(1) First, start Intellij IDEA, click File --> Settings --> Plugins, as follows:

Can idea use go language?

(2) Then, click Browse repositories, open Browse Repositories, and search for go. At this time, many related results will appear. Select the following.

Can idea use go language?

# (3) Click Install, and when the installation is complete, you will be prompted to restart IDEA.


Can idea use go language?

##2. Configure GOROOT<span style="font-size: 16px;"></span>Click File --> Settings --> Languages ​​& Frameworks --> Go --> GOROOT, as shown below:


Can idea use go language?

3. Configure GOPATH<span style="font-size: 16px;"></span>Click File --> Settings --> Languages ​​& Frameworks --> ; Go --> GOPATH, if you follow the steps to build the Go language environment in 1, I believe the Global GOPATH here will have the content as shown in the screenshot below. We can add our own project path to the Project GOPATH below.


Can idea use go language?

New Go project (1) Click File --> New --> Project to open New Project page, as shown in the screenshot below:

Can idea use go language? (2) Select Go, click the Next button, enter the following page, fill in the project name and project path

Can idea use go language?(3) Click Finish and choose to open the new project in a new window, as shown below:

Can idea use go language?(4) Follow the configuration of the new project in 2 GOPATH, screenshot below:

Can idea use go language?

Writing Go codeNow you can write Go code, you can see As shown in the screenshot below, the code prompt function greatly facilitates development.

Can idea use go language?

Run Go codeRight click to run, as shown in the screenshot below:

Can idea use go language?【Related recommendations:

Go video tutorial

, Programming teaching

The above is the detailed content of Can idea use go language?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template