The Complete Go Learning Guide

Go (also called Golang) is a compiled, statically typed programming language designed for clear software and efficient tools. It is popular for network services, cloud systems, and command-line programs.

How Go works

The Go compiler turns source files into an executable. Go uses packages to group code, has a built-in garbage collector, and includes language features for concurrent tasks.

What you will learn

You will progress from a first executable through functions, structs, slices, maps, packages, errors, concurrency, and practical projects.

How to use this guide

  1. Start with Chapter 1 and move through the chapters in order. New ideas build on the earlier ones.
  2. Type each example yourself, make a small change, and predict what will happen before running it.
  3. When a chapter is ready, its lesson will appear at the chapter link. These pages are currently blank lesson starters.

A step-by-step learning path

  1. Chapters 1-7: Learn to write Go programs. Run a program, use values and types, work with input and output, control repetition, and write functions.
  2. Chapters 8-12: Work with collections and data. Use arrays, slices and maps, process text, understand pointers, manage resources, and define structs and interfaces.
  3. Chapters 13-18: Organize practical tools. Learn visibility, packages and modules, the standard library, files, error handling, debugging, and tests.
  4. Chapters 19-24: Build reliable programs. Study algorithms, advanced Go features, concurrency and performance, build workflows, and guided projects.

Go ideas you will meet early

Your first Go program

Save this program as hello.go:

package main

import "fmt"

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

package main marks this as a runnable program. The fmt package provides formatted input and output. Execution starts in main, and fmt.Println writes text followed by a new line. With Go installed, run it from the file's folder:

go run hello.go

Go's formatter can keep source code consistent. As your program grows beyond one file, use a Go module to describe the project and its dependencies.

A simple way to study

First file: save your first program as hello.go and run it with go run hello.go.

Course chapters

Follow the 24 chapters in order, or choose a topic to revisit. Each chapter opens its own lesson page.

  1. What Go is and how a program runs
  2. Your first program
  3. Values, types, and variables
  4. Input and output
  5. Expressions and operators
  6. Decisions and loops
  7. Functions and program structure
  8. Collections: arrays, lists, and slices
  9. Strings and text
  10. References, pointers, and memory
  11. Memory and resource management
  12. User-defined types and data modeling
  13. Scope, lifetime, and visibility
  14. Modules, imports, and declarations
  15. Multi-file programs, packages, and libraries
  16. The standard library and ecosystem
  17. File input and output
  18. Errors, debugging, and testing
  19. Data structures and algorithms
  20. Advanced language topics
  21. Safety, portability, and performance
  22. Build systems and professional workflow
  23. A project ladder
  24. Further study checklist
0% read