Introduction of the Go

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. Go was developed in late 2007 by Robert Griesemer, Rob Pike, Ken Thompson, joined by Ian Lance Taylor, Russ Cox, and others, and finally opened source in November 2009, A stable version of Go 1 was released in early 2012. Go is now open to development and has an active community.

Go language features

  • Simple, fast and safe
  • Parallel, fun, open source
  • Memory management, array security, fast compilation

Go language usage

Go is designed as a system programming language for large central servers with Web servers, storage clusters, and the like. Go is arguably more efficient than most other languages in the world of high performance distributed systems. It provides a huge amount of parallel support, which is great for game server development.

Environmental installation

The Go language supports the following systems:

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

The installation package can be downloaded from golang.org/dl/.

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

Install it in Windows

For Windows, you can install it using the.msi suffix (you can find this file in the download list, for example, go1.4.2.windows-amd64.msi).

By default. Msi files are installed in the c:\Go directory. You can add the c:\Go\bin directory to the Path environment variable. After adding, you need to restart the command window to take effect.

UNIX/Linux/Mac OS X, and FreeBSD installation

The following describes how to use source code installation on UNIX/Linux/Mac OS X, and FreeBSD systems:

1, download the binary package: go1.4.linux-amd64.tar.gz.

2. Decompress the downloaded binary package to the /usr/local directory.

tar -C /usr/local- XZF go1.4. Linux - amd64. Tar. GzCopy the code

Add /usr/local/go/bin to PATH:

export PATH=$PATH:/usr/local/go/bin
Copy the code

Note: on MAC, you can double-click the.pkg installation package in /usr/local/go/ to install it.

Install the test

Create a working directory C:>Go_WorkSpace

Go is created in the Go_WorkSpace directory

package main

import "fmt"

func main() {
   fmt.Println("Hello, World!")}Copy the code

Run the go command to execute the preceding code. The following output is displayed:

C:\Go_WorkSpace>go run test.go

Hello, World!
Copy the code

The development tools

GolandThe installation

GoLand, Jetbrains’ Go language IDE, comes with a 30-day free trial.

The installation is also very simple. Visit the Download page of Gogland and download the corresponding software according to the three major platforms of your current system environment (Mac, Linux and Windows).

Download address: www.jetbrains.com/go/download…

GoLandRegistration code

All versions supported, permanently active!

goland.vip/