English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Golang basic tutorial

Golang control statements

Golang functions & methods

Golang structs

Golang slices & arrays

Golang strings (String)

Golang pointers

Golang interfaces

Golang concurrency

Golang exceptions (Error)

Other Golang items

Tutorial di base di Go

The Go tutorial provides basic and advanced concepts of Go programming. Our Go language tutorial is designed for beginners and professionals.

Go is a programming language that Google focuses on for rapid development and high performance.

Our Go tutorial includes all topics of the Go language, how to install go, such as go syntax if-else, for, for for-range, go break, continue, struct, interface, map, etc.

Introduction to the Go language

Go is a programming language developed by Robert Griesemer, Rob Pike, and Ken Thompson at Google in 2007. Go is a statically typed language. Go has syntax similar to C. It was developed for the purpose of high performance and rapid development. Go provides type safety, garbage collection, dynamic typing, many advanced built-in types, such as variable-length arrays and key-value mappings, etc.

  • Go is a modern, fast, and powerful standard library.

  • Go has built-in concurrency.

  • Go uses interfaces as the basis for code reusability.

The main feature of the Go language: 

  • Automatic garbage collection

  • More rich built-in types

  • Functions with multiple return values

  • Error handling

  • Anonymous functions and closures

  • Types and interfaces

  • Concurrency programming

  • Reflection  

  • Language interactivity

The basic structure of a Go program includes the following parts:

  • Package declaration

  • Import packages

  • Variables

  • Statements and expressions

  • Functions

  • Comments

Example

Let's look at a simple example of the Go programming language.

package main
import "fmt"
func main() {
   fmt.Println("Hello, World")
}
Test to see ‹/›

Output:

Ciao, Mondo