How this Go track works
- go run in the playground — write a single file with
package main,func main(), andfmt.Println; the dev runner compiles and runs withgo run. Use the standard library only in simple lessons. - Concurrency is a first-class topic — goroutines and channels appear early because Go targets network services, CLIs, and cloud-native tooling. Programs in concurrency lessons use
time.Sleepor small channels so they finish cleanly in the sandbox. - Prerequisites — finish Python or Java (variables, functions, types). Compare with Rust, Node.js, and C# when choosing stacks.
Go powers Kubernetes, Docker, Terraform, and many microservices. Multi-module repos, HTTP servers, and Kubernetes operators run locally—lessons simulate patterns with fmt.Println where the sandbox is single-file.
Install on your device (macOS, Linux, Windows)
Install Go 1.22+ for modules and CLI tools.
macOS
brew install goor tarball from go.dev/dl.
Linux
- Tarball from go.dev/dl or
sudo apt install -y golang-go/sudo dnf install -y golang.
Windows
winget install GoLang.Go
Verify: go version.
Run code on this site (Backend & language playgrounds)
- Clone or open this project locally; copy
.env.exampleto.env. - Ensure
LEARNING_RUNNER_ENABLED=trueandLEARNING_RUNNER_URL=http://127.0.0.1:9999/v1/execute. - Terminal 1:
php artisan serve(orcomposer run devfor Laravel + Vite + runner together). - Terminal 2:
npm run runner— keep it running while you click Run on server.
Go (often called Golang) is a statically typed, compiled language designed at Google for simple syntax, fast builds, and built-in concurrency. It powers cloud infrastructure (Kubernetes, Docker), network services, and DevOps tooling.
How this track differs from Python and Java
After the Python track, you know dynamic typing and rapid scripting. After Java, you know classes, interfaces, and a JVM. Go is statically typed like Java but compiles to a single native binary with a small runtime—no JVM, no interpreter loop for deployment.
Unlike browser-first JavaScript, Go targets servers, CLIs, and cloud-native systems. Concurrency with goroutines is idiomatic from early lessons—compare with Node.js event loops and Rust ownership when choosing stacks.
What you will learn
- Syntax: variables, types, control flow, functions, structs, methods, interfaces
- Collections: arrays, slices, maps, and pointers
- Concurrency: goroutines, channels, select, sync, context
- Stdlib: errors, testing, modules, file I/O, JSON, HTTP basics
- Applied patterns: interface design, generics, defer/panic, reflection intro
- Interview essentials, production habits, and CLI tooling teaser
Playground setup
This topic uses the server_compiled profile: your code runs with go run as a single main.go file. Use package main, func main(), and fmt.Println for output. Multi-module repos are taught for local development.
Important interview questions and answers
- Q: What is Go best known for?
A: Fast compilation, simple syntax, goroutine-based concurrency, and static binaries ideal for containers and microservices. - Q: Is Go object-oriented?
A: Go has structs and methods but no class inheritance—composition and interfaces replace classical OOP hierarchies.
Self-check
- In one sentence, what makes Go popular in cloud-native teams?
- Why do we recommend prior programming experience before Go?
Tip: Finish Python or Java first—Go builds on typed functions and structs with cloud-native concurrency.
Interview prep
- What is Go in one sentence?
A statically typed compiled language with built-in concurrency, garbage collection, and fast tooling—widely used for cloud infrastructure and network services.
- Why learn Go after Python or Java?
Python teaches rapid scripting; Java teaches OOP and static types—Go combines static typing with simple syntax, goroutines, and single-binary deployment for microservices.