Go Language Tutorial
Go is an open-source programming language that makes it easy to build simple, reliable, and efficient software.
Go was developed from late 2007 under the leadership of Robert Griesemer, Rob Pike, and Ken Thompson, with Ian Lance Taylor, Russ Cox, and others joining later. It was finally open-sourced in November 2009, and the stable version Go 1 was released in early 2012. Today, Go's development is fully open, and it has an active community.
Go Language Features
- Simple, fast, secure
- Concurrent, fun, open-source
- Memory management, array safety, fast compilation
Go Language Uses
The Go language is designed as a system programming language for giant central servers used to host web servers, storage clusters, or similar purposes.
In the field of high-performance distributed systems, Go undoubtedly offers higher development efficiency than most other languages. It provides massive parallel support, which is ideal for game server-side development.
First Go program
Next, let's write our first Go program hello.go (the file extension for Go language source files is .go), with the code as follows:
To execute Go language code, you can usego runcommand.
Executing the above code outputs:
$ go run hello.go Hello, World!
Additionally, we can also usego buildcommand to generate binary file:
$ go build hello.go $ ls hello hello.go $ ./hello Hello, World!other extensions