Under Windows Golang Development environment Construction

Source: Internet
Author: User
Tags golang ide

1. Golang Installation

    • Official website Download Address: https://golang.org/dl/
      I'm using this version: Https://golang.org/doc/install?download=go1.10.3.windows-amd64.msi, if you can't download it, just hang a VPN.

      Img20180809_162804.png

    • Installation
      After downloading the installation package, double-click the installation package to install, you can specify the installed directory when installing

2. Golang IDE Installation

I use the Go IDE is Liteide, this is the Chinese development of the go Language IDE, the interface is simple and useful, most like, each time you save the code, will automatically help you to align the code

    • Download Address

      • Official website: http://liteide.org/cn/
      • Source: Https://github.com/visualfc/liteide
      • Binary Download: https://sourceforge.net/projects/liteide/
    • Setting up an editing environment
      The author is Win64 environment, the estimate is set to Win64, open View---Edit the current environment, set goroot for your go installation path


      Img20180809_164012.png
    • Set/Add Gopath
      View--Management Gopath, add your own go code path to Gopath, such as your own Go code path is E:\code\go


      Img20180809_164802.png

You can also change the GOPATH environment variable to your go code path without using custom Gopath

Img20180809_165217.png
    • New Project
      Select the Gopath path where you want to store your project, and then template for Go1 Command project


      Img20180809_165610.png
    • Set compilation options and compile
      Compile-and-compile configuration---Custom, add "-gcflags"-n-l on the Buildargs bar to remove compilation optimizations for easy debugging "


      Img20180809_165933.png

CTRL + B compile the project, CTRL + F5 run the program

Img20180809_170507.png
    • Code debugging
      Press F5 to start code debugging, F10 Single step debugging, run results
Hello World!1!2!3!4!

So that your first go program is finished, is not very happy

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.