How to get started in the Go language install the Go Language programming environment under Windows

Source: Internet
Author: User

Overview

This article is for Go language learning first,"Go language Introduction" How to install the Go Language programming environment under Windows .

This paper mainly introduces the installation of the go language compiling environment and the development environment configuration based on notepad++ (Go language plugin, syntax highlighting).

Download the installation package

Installation package: https://golang.org/dl/


Choose to download the version of Windows here, click on the link to open the page may not start the download, the address bar will be displayed complete, such as: https://golang.org/doc/install?download= Go1.5.1.windows-amd64.msi, do not start the download does not matter, we copy, with thunder and other download tools.

Start installation

The next step on the line, there is no need to set up, the installation directory is best to keep the default, avoid encountering some strange problems.






After the installation is complete, you can open the command line to see if the installation was successful;

Any directory, directly execute "Go", you can see similar to the following:


or execute:

C:\>go Versiongo version go1.5.1 windows/amd64
Note: I do "Go" when the installation is done, I am prompted to find a file or directory, I open the environment variable, add a path to the user variable ,

Check the system variable "PATH" also has "C:\Go\bin", and then add a semicolon in the back, OK to save and then open the command line on it, do not know in the end which is working.



Installationnotepad++

Notepad++ 's homepage is http://notepad-plus-plus.org/, you can go up to the latest version of yourself.


The installation of the program is no different from the normal program, after installation, you can open notepad++.


By default, Notepad is a code interpreter without the go language, and does not have a handy compile feature. So we need to download the code interpreter that installs the Go language and configure it appropriately.


Installing plugins


Many plugins, you can directly press the keyboard "go" key to quickly locate:


I may be because it is not up-to-date, so I see a bunch of dialog boxes below.






Syntax highlighting

Note: Many articles say open go installation directory Misc\notepadplus under the Userdefinelang.xml, my go install directory under Misc This directory, but there is no notepadplus this directory;

Download language resolution Templates
Go language resolution Template: Http://notepad-plus.sourceforge.net/commun/userDefinedLang/go.zip
After the download, unzip, there are "Go.xml", "Userdefinelang_go.xml", "README" three files, we focus on the previous two files.

We extracted "userdefinelang_go.xml" into the C:\Go\misc directory and extracted the "go.xml" file into the C:\Program files (x86) \notepad++\plugins\apis directory,

Then customize the language format:






I have not modified the "<!--<NotepadPlus>" in the file, so I am prompted to fail the import and remove the comment.


After doing this, restart the next notepad++, and then see the Language menu with the go language.


Show Output window:


Execute: Plugin "GONPP" Go run, the right output such as:

Note: The file must be saved before the temporary file executes without any response.


The first few menus can not be used, will pop up the following error, not clear specific reasons.


Summary

Start the environment here is configured to complete, if you do not like to use notepad++, there are sublime,liteide and other Ides available.

Liteide is an integrated environment for go language development that can be
Http://code.google.com/p/golangide/downloads/list to see the latest version.
The configuration of this tool is documented in the download, and the small partners need me to follow up the details .


Related Learning URLs

Go Language Documentation


Getting started with Go language how to install the Go Language programming environment under Windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.