Go study notes (1)

Go language tutorial

Go is an open source programming language that makes it easy to construct simple, reliable, and efficient software.

Go was developed in late 2007 by Robert Griesemer, Rob Pike, Ken Thompson, and later joined by Ian Lance Taylor, Russ Cox and others, and was finally open sourced in November 2009, and Go 1 stable was released in early 2012 Version. Go development is now fully open and has an active community.


Go language features

  • Simple, fast and secure
  • Parallel, interesting, open source
  • Memory management, v-array safety, fast compilation

Go language usage

The Go language was designed as a systems programming language for hosting web servers, storage clusters, or giant central servers for similar purposes.

For the field of high-performance distributed systems, Go language undoubtedly has higher development efficiency than most other languages. It provides massive parallel support, which is perfect for game server development.

 

Go locale installation

The Go language supports the following systems:

  • Linux
  • FreeBSD
  • Mac OS X (also known as Darwin)
  • Window

The download address of the installation package is: https://golang.org/dl/ .

If you can't open it, you can use this address: https://golang.google.cn/dl/ .

 

Go environment variables

Create a working directory, such as E:\GOPATH

 

Add GOPATH environment variable

 

Add %GOPATH%\bin to Path

 

 

The first Go program

We go to the E:\GOPATH directory to create a folder src and create the source file main.og

 

Open a command line cd to this directory and type  go run hello . go 

 

you can see the following

Hello,World! 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324611915&siteId=291194637