Skip to content
ByteSizeGo
Interactive Go learning

Learn Go by doing.Keep goingbecause it’s fun.

Bite-sized exercises that have you reading, fixing, and writing real Go from the first minute. Nothing to install, and no account needed to start.

No account, no credit card, no install.
  • 1,300+learners
  • 11,000+exercises solved
  • 820+units finished
The real app: answer, get instant feedback, earn XP.
Try it now

Six ways to practice. Try every one.

These are the real first exercises from My First Go Program, checked by the same engine as the app. No account needed.

Go programs all have a main function. Can you see what's missing with this one?

Select the missing character:

+10 XP
package main

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

Why GoFlow

You don’t learn Go by watching someone else write it. You learn it by reading real programs, spotting real bugs, and running real code, a few minutes at a time, until the syntax stops being something you look up and starts being something you know.

Learn across
15units
Practice with
241exercises
Mix of
6exercise types
Free forever
10units
Stay motivated

Built like a game. Serious about Go.

Streaks, XP, and hearts keep you coming back, and the code you write is the real thing.

Real code, really run

When an exercise asks you to write a program, it compiles and runs on the official Go Playground, and your output is checked for you.

Daily streaks

Show up for a few minutes a day and your streak grows. Consistency beats cramming, and the gopher keeps count.

XP and levels

Every exercise pays out XP. Level up from Hello, World to goroutines and channels.

Hearts

Wrong answers cost a heart, so you slow down and actually read the code. One refills every four hours.

One clear path

Each unit builds on the last, so you always know what to learn next, from your first program to concurrency and testing.

The curriculum

Everything you’ll learn

15 units and 241 exercises, in an order where each one builds on the last. The first 10 units are free forever.

1 My First Go Program Learn the fundamentals of Go programming 8 exercises · 110 XP Play now
2 Variables & Types Master Go's type system and variable declarations 12 exercises · 185 XP Free
  1. What is a Value? Multiple choice 10 XP
  2. Types & Values Match pairs 15 XP
  3. Your First Variable Fill in the blank 15 XP
  4. Short Declaration Fill in the blank 15 XP
  5. String Concatenation Fill in the blank 15 XP
  6. Working with Integer Variables Fill in the blank 10 XP
  7. Boolean Operators Match pairs 15 XP
  8. Boolean Logic Fill in the blank 15 XP
  9. Zero Values Match pairs 15 XP
  10. Type Conversion Fill in the blank 15 XP
  11. Find the Type Bug Spot the bug 20 XP
  12. Coding Challenge: Calculator Write & run Go 25 XP
3 Working with Collections Arrays, slices, and maps — organizing your data 22 exercises · 360 XP Free
  1. What is an Array? Multiple choice 10 XP
  2. Declaring Arrays Fill in the blank 15 XP
  3. Access & Update Elements Fill in the blank 15 XP
  4. Array Length Fill in the blank 15 XP
  5. Coding Challenge: Array Sum Write & run Go 25 XP
  6. What is a Slice? Multiple choice 10 XP
  7. Declaring Slices Match pairs 15 XP
  8. Slice Operations Fill in the blank 15 XP
  9. Appending to Slices Fill in the blank 15 XP
  10. Slicing a Slice Fill in the blank 15 XP
  11. Coding Challenge: Build a Guest List Write & run Go 25 XP
  12. What is a Map? Multiple choice 10 XP
  13. Declaring Maps Match pairs 15 XP
  14. Reading & Writing Maps Fill in the blank 15 XP
  15. Deleting from Maps Fill in the blank 15 XP
  16. Checking if Key Exists Fill in the blank 15 XP
  17. Coding Challenge: Word Counter Write & run Go 25 XP
  18. Zero Values in Collections Match pairs 15 XP
  19. Spot the Nil Map Bug Spot the bug 20 XP
  20. Initializing Before Use Fill in the blank 15 XP
  21. Slices & Maps in Functions Multiple choice 10 XP
  22. Final Challenge: Inventory Tracker Write & run Go 30 XP
4 Control Flow if statements, loops, and switch cases 18 exercises · 265 XP Free
  1. What is an if Statement? Multiple choice 10 XP
  2. Your First if Statement Fill in the blank 15 XP
  3. Adding else Fill in the blank 15 XP
  4. Multiple Conditions with else if Fill in the blank 15 XP
  5. Introduction to switch Multiple choice 10 XP
  6. Your First switch Fill in the blank 15 XP
  7. Switch Without a Value Order the code 15 XP
  8. The Classic for Loop Fill in the blank 15 XP
  9. While-Style Loop Fill in the blank 15 XP
  10. Infinite Loops Multiple choice 10 XP
  11. Range Over Slices Fill in the blank 15 XP
  12. Range Over Maps Fill in the blank 15 XP
  13. Range Over Strings Multiple choice 10 XP
  14. Breaking Out of Loops Fill in the blank 15 XP
  15. Skipping with continue Fill in the blank 15 XP
  16. break vs continue Match pairs 15 XP
  17. Spot the Loop Bug Spot the bug 15 XP
  18. Coding Challenge: FizzBuzz Write & run Go 30 XP
5 Structs & Pointers Learn how to create custom types with structs and understand pointers 15 exercises · 220 XP Free
  1. What is a Struct? Multiple choice 10 XP
  2. Declaring a Struct Fill in the blank 15 XP
  3. Creating Struct Instances Fill in the blank 15 XP
  4. Accessing Struct Fields Fill in the blank 15 XP
  5. Modifying Struct Fields Write & run Go 20 XP
  6. Struct Literal Styles Match pairs 10 XP
  7. Mini-Challenge: Build a Book Write & run Go 20 XP
  8. What is a Pointer? Multiple choice 10 XP
  9. Creating Pointers Fill in the blank 15 XP
  10. Dereferencing Pointers Fill in the blank 15 XP
  11. Modifying Values via Pointers Fill in the blank 15 XP
  12. Why Pointers with Structs? Multiple choice 10 XP
  13. Why Use Pointers? Multiple choice 10 XP
  14. Spot the Pointer Bug Spot the bug 15 XP
  15. Coding Challenge: Build a Counter Write & run Go 25 XP
6 Functions Build reusable code with functions, methods, and receivers 20 exercises · 285 XP Free
  1. What Are Functions? Multiple choice 10 XP
  2. Your First Function Fill in the blank 15 XP
  3. Calling Functions Fill in the blank 15 XP
  4. Function Parameters Fill in the blank 15 XP
  5. Return Values Fill in the blank 15 XP
  6. Build a Function Order the code 15 XP
  7. Multiple Return Values Multiple choice 10 XP
  8. Using Multiple Returns Fill in the blank 15 XP
  9. Named Return Values Multiple choice 10 XP
  10. What Are Variadic Functions? Multiple choice 10 XP
  11. Using Variadic Functions Fill in the blank 15 XP
  12. Spreading Slices Fill in the blank 15 XP
  13. Functions as Values Fill in the blank 15 XP
  14. Function Types Match pairs 15 XP
  15. Passing Functions Fill in the blank 15 XP
  16. Anonymous Functions Fill in the blank 15 XP
  17. What is a Closure? Multiple choice 10 XP
  18. Using Closures Fill in the blank 15 XP
  19. Spot the Closure Bug Spot the bug 15 XP
  20. Coding Challenge: Function Factory Write & run Go 25 XP
7 Methods & Packages Add behavior to types with methods and organize code into packages 11 exercises · 165 XP Free
  1. What is a Method? Multiple choice 10 XP
  2. Your First Method Fill in the blank 15 XP
  3. Method vs Function Match pairs 15 XP
  4. Value Receivers Fill in the blank 15 XP
  5. Pointer Receivers Fill in the blank 15 XP
  6. When to Use Pointer Receivers Multiple choice 10 XP
  7. Spot the Method Bug Spot the bug 15 XP
  8. defer Execution Order Order the code 15 XP
  9. Exported Names Multiple choice 10 XP
  10. Package Visibility Fill in the blank 15 XP
  11. Coding Challenge: Method Builder Write & run Go 30 XP
8 Error Handling Master Go's explicit error handling with the error type, wrapping, and custom errors 30 exercises · 430 XP Free
  1. What Is an Error? Multiple choice 10 XP
  2. The Error Interface Fill in the blank 10 XP
  3. Creating Errors with errors.New Fill in the blank 15 XP
  4. Dynamic Errors with fmt.Errorf Fill in the blank 15 XP
  5. The (value, error) Pattern Order the code 15 XP
  6. Checking Errors Fill in the blank 15 XP
  7. Early Returns Multiple choice 10 XP
  8. Error Zero Value Multiple choice 10 XP
  9. Handle the Error Write & run Go 20 XP
  10. Spot the Ignored Error Spot the bug 15 XP
  11. Why Wrap Errors? Multiple choice 10 XP
  12. Wrapping Errors Fill in the blank 15 XP
  13. Checking Error Types with errors.Is Fill in the blank 15 XP
  14. Extracting Error Types with errors.As Fill in the blank 15 XP
  15. errors.Is vs errors.As Match pairs 15 XP
  16. Build an Error Chain Write & run Go 20 XP
  17. What Are Sentinel Errors? Multiple choice 10 XP
  18. Creating Sentinel Errors Fill in the blank 15 XP
  19. Why Custom Error Types? Multiple choice 10 XP
  20. Implementing the Error Interface Fill in the blank 15 XP
  21. Build a Custom Error Write & run Go 20 XP
  22. When NOT to Panic Multiple choice 10 XP
  23. What Is Panic? Multiple choice 10 XP
  24. Calling Panic Fill in the blank 15 XP
  25. What Is Recover? Multiple choice 10 XP
  26. The Recover Pattern Order the code 15 XP
  27. Error vs Panic Match pairs 15 XP
  28. Spot the Bad Panic Spot the bug 15 XP
  29. The Must Pattern Fill in the blank 15 XP
  30. Coding Challenge: Error Handler Write & run Go 30 XP
9 Interfaces Learn Go's powerful implicit interface system for writing flexible, decoupled code 15 exercises · 210 XP Free
  1. What is an Interface? Multiple choice 10 XP
  2. Declaring Interfaces Fill in the blank 15 XP
  3. Implicit Implementation Match pairs 15 XP
  4. Your First Interface Fill in the blank 15 XP
  5. Interface Satisfaction Spot the bug 15 XP
  6. The Stringer Interface Fill in the blank 15 XP
  7. The Error Interface Multiple choice 10 XP
  8. The Reader Interface Multiple choice 10 XP
  9. Interface in Action Order the code 15 XP
  10. What is a Type Assertion? Multiple choice 10 XP
  11. Safe Type Assertions Fill in the blank 15 XP
  12. Type Switch Fill in the blank 15 XP
  13. Spot the Panic Spot the bug 15 XP
  14. The Empty Interface Multiple choice 10 XP
  15. Interface Coding Challenge Write & run Go 25 XP
10 Concurrency Learn Go's powerful concurrency model with goroutines and channels 15 exercises · 210 XP Free
  1. What is a Goroutine? Multiple choice 10 XP
  2. Starting a Goroutine Fill in the blank 15 XP
  3. Concurrent vs Parallel Multiple choice 10 XP
  4. The Main Goroutine Spot the bug 15 XP
  5. Anonymous Goroutines Fill in the blank 15 XP
  6. What is a Channel? Multiple choice 10 XP
  7. Creating Channels Fill in the blank 15 XP
  8. Sending and Receiving Fill in the blank 15 XP
  9. Channels Block Multiple choice 10 XP
  10. Channel Direction Match pairs 15 XP
  11. Signaling Completion Fill in the blank 15 XP
  12. Closing Channels Fill in the blank 15 XP
  13. Spot the Deadlock Spot the bug 15 XP
  14. Buffered vs Unbuffered Multiple choice 10 XP
  15. Concurrency Coding Challenge Write & run Go 25 XP
11 Context Master Go's context package for cancellation, timeouts, and request-scoped data 10 exercises · 145 XP Basic & Pro
  1. What is Context? Multiple choice 10 XP
  2. context.Background Fill in the blank 15 XP
  3. Passing Context Multiple choice 10 XP
  4. Why Cancellation Matters Multiple choice 10 XP
  5. WithCancel Fill in the blank 15 XP
  6. Listening for Cancellation Fill in the blank 15 XP
  7. Spot the Leak Spot the bug 15 XP
  8. WithTimeout Fill in the blank 15 XP
  9. Timeout in Action Order the code 15 XP
  10. Context Coding Challenge Write & run Go 25 XP
12 Testing Basics Learn to write tests in Go using the testing package 15 exercises · 195 XP Basic & Pro
  1. Why Write Tests? Multiple choice 10 XP
  2. Test File Naming Multiple choice 10 XP
  3. Test Function Signature Fill in the blank 15 XP
  4. Your First Test Fill in the blank 15 XP
  5. Error vs Fatal Multiple choice 10 XP
  6. Running Tests Multiple choice 10 XP
  7. Testing Concepts Match pairs 15 XP
  8. Got vs Want Pattern Fill in the blank 15 XP
  9. Spot the Test Bug Spot the bug 15 XP
  10. Test Naming Multiple choice 10 XP
  11. The testing Package Fill in the blank 15 XP
  12. Spot the Signature Bug Spot the bug 15 XP
  13. Test Structure Order the code 15 XP
  14. Verbose Output Multiple choice 10 XP
  15. Helpful Error Messages Fill in the blank 15 XP
13 Mastering Pointers Go beyond the basics — learn real-world pointer patterns, nil safety, and when pointers help (or hurt) your code. 15 exercises · 230 XP Basic & Pro
  1. The Copy Trap Multiple choice 10 XP
  2. The &Type{} Pattern Fill in the blank 15 XP
  3. Swap with Pointers Write & run Go 20 XP
  4. Pointer Fields in Structs Fill in the blank 15 XP
  5. Factory Functions Write & run Go 20 XP
  6. Copying Behavior in Go Match pairs 15 XP
  7. Mini-Challenge: Linked Node Write & run Go 20 XP
  8. Nil Pointer Trap Multiple choice 10 XP
  9. Defensive Nil Checks Order the code 15 XP
  10. Pointer Aliasing Multiple choice 10 XP
  11. Safe Pointer Returns Write & run Go 20 XP
  12. When NOT to Use Pointers Multiple choice 10 XP
  13. Pointer Comparison Match pairs 10 XP
  14. Spot the Nil Chain Bug Spot the bug 15 XP
  15. Challenge: Config Builder Write & run Go 25 XP
14 Stdlib Essentials Learn the standard library through short drills and guided mini-challenges that build from text handling to config loading. 19 exercises · 320 XP Basic & Pro
  1. What is the Standard Library? Multiple choice 10 XP
  2. Clean and Uppercase Text Fill in the blank 15 XP
  3. Split and Join Strings Fill in the blank 15 XP
  4. String to Int with strconv Fill in the blank 15 XP
  5. Int to String with strconv Fill in the blank 15 XP
  6. Parse Durations Fill in the blank 15 XP
  7. Format Time as RFC3339 Fill in the blank 15 XP
  8. Match Package to Purpose Match pairs 15 XP
  9. Spot the Conversion Bug Spot the bug 15 XP
  10. Check Specific Errors Fill in the blank 15 XP
  11. Sort a Slice Order the code 15 XP
  12. Guided Challenge: Parse and Sort Write & run Go 30 XP
  13. Read a File with os.ReadFile Fill in the blank 15 XP
  14. Build Safe Paths with filepath.Join Fill in the blank 15 XP
  15. Marshal Structs to JSON Fill in the blank 15 XP
  16. Unmarshal JSON into Structs Fill in the blank 15 XP
  17. Spot the Scanner Bug Spot the bug 15 XP
  18. Guided Challenge: Validate Config Write & run Go 25 XP
  19. Challenge: Config Loader Write & run Go 30 XP
15 Generics Write code once for many types: type parameters, constraints, and generic types, plus when an interface is the simpler tool. 16 exercises · 235 XP Basic & Pro
  1. Why Generics? Multiple choice 10 XP
  2. Your First Type Parameter Fill in the blank 15 XP
  3. Type Inference Multiple choice 10 XP
  4. Know Your Constraints Match pairs 15 XP
  5. Find a Value Fill in the blank 15 XP
  6. Spot the Compile Error Spot the bug 15 XP
  7. Write Your Own Constraint Fill in the blank 15 XP
  8. What Does ~ Mean? Multiple choice 10 XP
  9. Build a Generic Map Order the code 15 XP
  10. Two Type Parameters Multiple choice 10 XP
  11. A Generic Type Fill in the blank 15 XP
  12. Returning Nothing Multiple choice 10 XP
  13. Generics in the Standard Library Match pairs 15 XP
  14. Generics or an Interface? Multiple choice 10 XP
  15. Challenge: Filter Write & run Go 25 XP
  16. Challenge: A Generic Set Write & run Go 30 XP
241

hands-on exercises across 15 units, with 3,565 XP to earn. New ones are added regularly.

  • 61 Multiple choice
  • 98 Fill in the blank
  • 12 Order the code
  • 21 Match pairs
  • 20 Spot the bug
  • 29 Write & run Go
Start Unit 1 free
Matt Boyle
Meet your teacher

Hi, I’m Matt Boyle.

I’m an engineering leader who has spent years building distributed systems in Go, at companies like Cloudflare and General Electric and at high-growth startups like Curve and Crowdcube. I’ve been writing Go in production since 2018.

In 2022 I published the best-selling book Domain-Driven Design with Golang, and I teach Go through ByteSizeGo’s courses. I built GoFlow for the part of learning Go that no book or video can do for you: the practice.

Pricing

Start free. Upgrade when you’re hooked.

The first 10 units are free forever. Upgrade to unlock the whole curriculum and practice as much as you like.

Free

Everything you need to start.

$0forever

Start free
  • First 10 units
  • All 6 exercise types
  • 5 hearts, one back every 4 hours
  • 10 energy a day

Basic

For steady daily practice.

$10/month

Get Basic
  • All 15 units
  • 10 hearts
  • 20 energy a day
  • Everything in Free

Change or manage your plan any time from Manage Subscription in your account menu.

Good to know

Questions, answered

Do I need an account to start?

No. You can play all of My First Go Program right now, and your progress is saved on this device. When you want to keep it, create a free account with just your email and it comes with you.

Is GoFlow really free?

Yes. The first 10 units are free forever, no credit card required. Basic and Pro unlock all 15 units, and Pro adds unlimited hearts and energy for when you want to binge.

Do I need Go installed?

No. Everything happens in your browser. When an exercise asks you to write a full program, it compiles and runs on the official Go Playground, so you write and run real Go without installing anything.

Who is GoFlow for?

Anyone who wants Go to stick. If Go is your first programming language, the early units assume nothing. If it’s your fifth, you’ll move through them fast and hit the interesting parts sooner.

How long does it take each day?

About five minutes. The daily goal is three exercises: long enough to learn something real, short enough to fit in a coffee break. Streaks reward showing up daily, not marathon sessions.

What are hearts and energy?

Each wrong answer costs a heart, and starting a new exercise costs one energy (Unit 1 is free: its exercises don't use any). Free accounts have 5 hearts, with one coming back every four hours, and 10 energy that refills at midnight. Basic doubles both, and Pro makes them unlimited.

How do I manage my subscription?

Use Manage Subscription in your account menu to change plans, switch between monthly and yearly, or update your payment details.

Start your streak today

Five minutes from now you’ll have written real Go. No account needed until you want to save your progress.

No credit card required