Skip to content
Open Sourcebeginner

What is Go?

Updated Nov 30, 20263 min readBased on official documentation
What is Go?

In short

Go is an open source programming language made by Google to help programmers write fast, simple and reliable software. It compiles to machine code, handles many tasks at once with built-in concurrency features, and includes garbage collection so you do not manage memory by hand.

What Go is for

Go, often called Golang, is a programming language. Programmers use it to build web servers, command line tools, network services and other software. The project aims to make programmers more productive. The language is meant to be easy to read, easy to write and quick to run.

Go is a compiled language. A compiler (a program that turns your source code into machine code) runs before the program starts. This means the result runs directly on the computer, which is why Go programs are fast. Compilation is also quick, so you can test changes without a long wait.

Key ideas

Go is statically typed. Every variable has a type, such as a number or a piece of text, and the compiler checks those types before the program runs. Mistakes are caught early. Still, the language is designed so that writing code often feels as light as writing in a dynamic language.

Go has garbage collection. This is an automatic system that frees memory your program no longer uses, so you do not need to free it yourself. The official guide to the Go garbage collector explains how this works in more detail.

Go also has concurrency built in. Concurrency means doing several tasks at the same time, for example handling many network connections. Go uses goroutines, which are lightweight functions that run side by side, and channels, which let them send values to each other. This makes it easier to get work done on machines with several processor cores.

How it works

Go code lives in packages, and packages are grouped into modules. A module is a collection of related packages that can be versioned and shared. The go command is the main tool. You use it to build, test, run and manage dependencies. Dependencies are outside packages your code uses, and Go tracks them for you.

A typical first step is installing Go, then writing a small program in a file and running it with the go command. The official Getting Started tutorial walks through a Hello, World program and introduces modules and tools step by step.

A simple example

Here is a small program that prints a greeting. Save it as main.go and run it with go run main.go.

package main

import "fmt"

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

The package main line marks a program. The import line brings in the fmt package from the standard library, which is the set of packages that ships with Go. The main function is where the program starts.

Common mistakes for beginners

New Go programmers often forget that unused variables and unused imports are compile errors. The compiler stops you until you remove them, which is helpful but can feel strict at first.

Another common issue is treating goroutines as free and forgetting to wait for them to finish. If the main function exits, the program ends and any goroutines still running stop with it. Learn the basics of channels and waiting before you build larger concurrent programs.

Where to go next

The official A Tour of Go is an interactive introduction that covers syntax, methods, interfaces, generics and concurrency with short exercises. Effective Go gives tips on writing clear, idiomatic code and is worth reading early. The Frequently Asked Questions page answers many common questions about the language and its design.

If you plan to store data, the tutorial on accessing a relational database shows how Go works with the database/sql package. Once you are comfortable with the basics, the language specification and the standard library package documentation become your main references.

FAQ

Is Go the same as Golang?

Yes. Golang is a common nickname because the official website is go.dev and search engines often use that name. The language itself is called Go.

Is Go an open source language?

Yes. The Go programming language is an open source project, so its source code is publicly available and developers can contribute to it through the official contribution guide.

Do I need to manage memory manually in Go?

No. Go includes a garbage collector that automatically frees memory your program no longer uses, so you do not need to release memory by hand.

What is the best way to start learning Go?

Start with the Getting Started tutorial to install Go and write a Hello, World program. Then work through A Tour of Go, which includes short exercises to practice each topic.

Sources

This page is based on the official documentation below. Read it for full detail.

Go — official documentation ↗

Go in the news

blozhikDeveloper news from across the web, explained. Every story links to its original sources.