Go Language Learning First day _ Environment construction

Source: Internet
Author: User

Preface

Go语言是谷歌2009发布的第二款开源编程语言。虽然已经发布了那么久了,但是到现在GO语言从很多人的口中传到我耳中来,所有我觉得有必要系统的学习一波了,面对新的东西我觉得我们都要尝试去了解,所有就有这个博客。

Go Environment file preparation :

1, go of the installation package:
(Inside wall): https://studygolang.com/dl

2, development tools Goland:
(Outside the wall) https://www.jetbrains.com/go/download/#section =windows
How to use Goland correctly
Pro-Test valid: http://idea.youbbs.org (not the link does not need to click in, copy the past use is good)

Software Installation

1、 Go 语言需要配置 GOROOT 和 Path 两个环境变量:GOROOT 和 GOPATH。

1.1 root directory Goroot and Path
If the first step installation uses the default installation directory C:\Go\, the Setup program has set the Goroot and Path environment variables so that they do not need to be manually set.



If you do not use the default installation directory for the first step, you need to manually configure the above two variables, noting that the Path configuration does not affect other installers (such as Java,oracle,maven, etc.).

1.2Go working Directory Gopath
This is a follow-up code directory, create a new system variable Gopath, point it to your code directory:

1.3 Command line validation of environment variables
Open the CMD terminal and enter the go env to see if the variable is set successfully:

2、 GoLand 环境配置
A bit of a problem, so copy someone else's:

Write a Hello Word


Remember to change this to the main new hw.go here is SRC,

成功运行,搭建完毕

Summary

Relatively simple ha, is based on the order to go, and then complete the go language into the sea, thank you!

Go Language Learning First day _ Environment construction

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.