Beginner
Golang
Learn Go end to end. Start with packages, variables, and control flow, then go deeper into structs, interfaces, concurrency, testing, HTTP servers, databases, generics, profiling, and shipping real binaries to production.
20 lessons12.3h hands-on11 languages
Start learning freeGolang course20 lessons, in order
- 125 min
Hello, Go
Package mainImportFunc mainFmt.PrintlnGo run - 225 min
Variables and Types
Var declarationShort declaration :=IntFloat64StringBool+2 - 330 min
Control Flow: if and for
IfElse ifElseFor loopFor as whileInfinite for+2 - 430 min
Functions
Func keywordParametersReturn valuesMultiple return valuesNamed return valuesBlank identifier - 535 min
Slices and Maps
Slice literalAppendLenIndexingRangeMap literal+2 - 640 min
Tiny CLI Capstone
Os.ArgsStrconv.AtoiError handling with if err != nilOs.ExitGo buildPutting it together - 735 min
Structs and Pointers
Struct definitionField accessZero values for structsPointer types& and * operatorsPointer receivers vs value receivers+1 - 835 min
Methods and Interfaces
Method declarationReceiver typesPointer vs value receiversInterface definitionImplicit interface satisfactionSmall interfaces+1 - 935 min
Error Handling
Error interfaceFmt.Errorf with %wErrors.IsErrors.AsCustom error typesPanic vs error+1 - 1040 min
Goroutines and Channels
The go keywordGoroutine lifetimeUnbuffered channelsBuffered channelsSend and receiveRange over channel+1 - 1145 min
Concurrency Patterns
Select statementContext.Context for cancellationSync.WaitGroupSync.MutexWorker pool patternFan-out fan-in idea - 1240 min
A Tour of the Standard Library
FmtStringsStrconvTimeOsBufio+1 - 1340 min
Testing and Benchmarks
Go testTesting.TTable-driven testsT.Run subtestsTesting.B benchmarks_test.go file naming+1 - 1435 min
Modules and Project Structure
Go mod initGo.mod and go.sumImport pathsPackage vs moduleInternal/ folderCmd/ layout+1 - 1545 min
HTTP Servers
Net/httpHttp.HandleFuncHttp.ServerJSON responsesRequest routingMiddleware via http.Handler wrapping+1 - 1645 min
Databases with database/sql
Database/sql packageDriver importsSql.Open and sql.DB poolExec vs Query vs QueryRowPrepared statementsScanning rows+1 - 1735 min
Generics
Type parameters with [T any]ConstraintsComparableTilde approximation ~intGeneric Map and FilterWhen generics help, when they do not - 1840 min
Performance and Profiling
Go test -benchPprof CPU and heap profilesEscape analysis with -gcflags=-mAvoiding unnecessary allocationsPreallocating slicesSync.Pool intuition - 1940 min
Design Patterns in Go
Functional options patternRepository patternDependency injection via interfacesContext propagation through call stacksConstructor functions - 2045 min
Deployment and Production
CGO_ENABLED=0 static binariesCross-compile with GOOS and GOARCHGraceful shutdown with http.Server and signal.NotifyContextMinimal Dockerfile with scratch or distrolessReading config from environment variables
Learn Golang in your language
Every lesson, quiz, and tutor reply renders in your language. The AI tutor matches the language you ask in.
Learn Golang in EnglishAprende Golang en españolAprenda Golang em portuguêsتعلّم Golang بالعربيةGolang را به فارسی یاد بگیریدApprenez Golang en françaisGolang हिन्दी में सीखें用中文学习 GolangPelajari Golang dalam bahasa IndonesiaИзучайте Golang на русскомGolang auf Deutsch lernen
