Go language set sail

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.
0
Resources
Official Download Address https://code.google.com/p/go/downloads/list
Go Language Civil service network http://zh.golanger.com/


1
Download the installation package
in the official download of the appropriate Go language development package for Windows, use the MSI installation package here.


2
installation
run the downloaded MSI installation file, all the way next to know the installation is complete.
Note 1: Do not have Chinese in the path when you select the installation path.
NOTE 2: If you use a ZIP package, you need to set the environment variable,
system Variable Name: Goroot value: Where Go is installed
system variable Name: Path append value:;%goroot%\bin


3
Confirm Installation Success
execute the command under Windows Command prompt Cmd.exe window: Go version, after which the correct version information appears.


4
Writing code
Create a new 1 TXT file, open and enter the following code:
Package Main
import "FMT"
Func Main () {
FMT. Printf ("Hello World, imleeo!")
}


Note:
Func Main () {
can not be written
func main ()
{
Otherwise, the error will be compiled


5
Save
Save: Save as Imleeo.go file


6
compiling
compile: Execute command in cmd, go build-o C:\imleeo.exe C:\imleeo.go


7
Execution
execute: Execute command in cmd, Imleeo.exe


8
Show

The word "Hello World, Imleeo" is displayed in CMD.


Welcome to Go QQ Group:215466300


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.