Go Tutorial
Learn Go step by step through 78 structured lessons. The course starts with essential concepts and progresses toward practical, advanced topics, with explanations, syntax, examples, common mistakes and exercises you can try yourself.
- Level: Beginner to advanced
- Format: 78 free, self-paced lessons
- Best for: Students, career changers and developers refreshing their skills
What You Will Learn
This learning path covers the following areas in curriculum order:
- Go Fundamentals
- Go Basics
- Control Flow
- Functions
- Arrays, Slices, and Maps
- Structs and Methods
- Pointers and Memory
- Interfaces
- Error Handling
- Concurrency: Goroutines
- Concurrency: Channels
- Packages and Modules
- Testing
- Go for Web and I/O
- Go Best Practices
Who This Course Is For
This tutorial is suitable for complete beginners as well as learners who already know some programming and want a structured reference. Start from the first lesson if the subject is new to you. Experienced learners can use the curriculum below to jump directly to a specific concept.
How to Use This Tutorial
- Read each lesson in curriculum order and run every example yourself.
- Change the examples to test your understanding instead of only copying them.
- Complete the exercises and review the common-mistake sections before moving on.
- Bookmark this course page so you can return to the complete lesson index.
Course Contents
Go Fundamentals
- Go Introduction
- Installing Go
- Go Get Started (Hello World)
- How Go Works: Compiled and Statically Typed
- Go Modules and go.mod
- The go run, go build, and go install Commands
Go Basics
- Variables and var
- Short Variable Declaration (:=)
- Basic Types
- Constants and iota
- Type Conversion
- Formatting and Printing (fmt)
Control Flow
Functions
- Functions in Go
- Multiple Return Values
- Named Return Values
- Variadic Functions
- Functions as Values and Closures
- Anonymous Functions
Arrays, Slices, and Maps
Structs and Methods
Pointers and Memory
- Pointers in Go
- Passing by Value vs by Reference
- The new and make Functions
- Stack vs Heap and Escape Analysis
Interfaces
- Interfaces Explained
- Implicit Interface Satisfaction
- The Empty Interface (any)
- Type Assertions
- Type Switches
- The Error Interface
Error Handling
- Error Handling in Go
- Creating Custom Errors
- Wrapping Errors with fmt.Errorf and %w
- errors.Is and errors.As
- When to panic vs Return an Error
Concurrency: Goroutines
Concurrency: Channels
- Channels Explained
- Buffered vs Unbuffered Channels
- select Statements
- Worker Pools
- Context for Cancellation
Packages and Modules
- Organizing Code into Packages
- Exported vs Unexported Identifiers
- Importing Packages
- The Standard Library Tour
- Third-Party Modules and go get
Testing
Go for Web and I/O
- Reading and Writing Files
- JSON Encoding and Decoding
- Building an HTTP Server with net/http
- Handling HTTP Requests and Routing
- Making HTTP Requests with net/http Client
Go Best Practices
- Go Naming Conventions
- Effective Error Handling Patterns
- gofmt and go vet
- Common Go Mistakes
- Go Command Reference
Frequently Asked Questions
Is this Go tutorial free?
Yes. The lessons listed on this page are free to read and can be completed at your own pace.
Do I need previous experience?
No previous experience is required for the introductory lessons. Some advanced modules are easier if you first complete the fundamentals in this course.
How should I practise?
Type and run the examples, deliberately change their inputs, predict the result before execution and build a small project after completing each major section.
