Back to Home
Tutorials · Go

Go Examples

Fifteen guides that take you from no compiler to a Go web service running under systemd — and every stop between. Install the toolchain, learn the language by building things (a bowling scorer, algebra solvers, Big O side by side), work through interview problems, then write real programs: a concurrent fetcher, a chat server, a URL shortener, a blog CMS, a live mortgage app. Every code block is complete and runnable with go run; nothing needs a framework.

The route these guides follow
⬇
Install
go version
✎
Basics
syntax · types
🎳
Lessons
build · refactor
⚙
Projects
net/http · sqlite
☁
Hosting
systemd · nginx
Guides 15
START HERE

A compiler, and the basics.

LESSONS

Learn the language by building something.

PROJECTS

Complete programs you can go run the moment you paste them.

HOSTING

Keep a Go web app running.

The same small web server, kept alive across reboots on each operating system. Linux is the one this site runs on — the demo at /goapp/hello/ is that guide's output.

One toolchain, one binary

go build produces a single statically linked executable. Every hosting guide above is really the same three steps — build it, copy it, tell the OS to restart it if it dies — and only the third step differs between systems.

go mod init, go run ., go build. Everything on this page starts with those three commands.