Go language programming under Windows Development Environment Configuration (graphic)

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

1. Download the latest go for Windows release 2010-05-04 in Go Chinese forum

2. Unzip the download package under C drive.

3. Set environment variables.

Code:
    1. Set Goroot = C :/go
    2. Set Goarch = 386      
    3. Set Path = C :/go/bin
    4. Set Goos = Windows   

4. Write the first go Language program code.

Code:
    1. Package Main
    2. Import "FMT"   
    3. Func Main () {
    4. FMT. Printf ("This was firstmy/n go program")
    5. };

Written in Notepad and saved as H.go, I saved it under C:/go/work.

5. Compile and run the H.go file

Run cmd, go to c:/go/work and enter separately

Code:
    1. 8g H.go
    2. 8l h.8
    3. 8.out

You can see that H.go compiles and runs successfully. You can also see that there are three files in the current directory

6.go language has yet to be improved, in Windows Chinese will be garbled, the official recommended notepad++ programming, has not yet tried, the final garbled problem I have not resolved. The Go directory Also

There are a lot of test examples.

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.