Go - Beginner Path

Beginner 10/10 Teacher 10/10 Architect 10/10

How to use this

Follow these steps in order. Each step takes 10–20 minutes and ends with a small practice task and a quick self-check.

1) Install & Verify (10–15 min)

  • Read: Installation & Toolchain
  • Do: Install Go and run go version
  • Practice: Print your Go version and OS in a sentence
  • Self-check: Can you run go env GOPATH without errors?

2) First Program (10–15 min)

  • Read: First Program
  • Do: Create main.go, run with go run .
  • Practice: Change the text, then go build and run the binary
  • Self-check: Explain the difference between go run and go build

3) Syntax & Basics (15–20 min)

  • Read: Syntax & Basics
  • Do: Call math.Pi in your program
  • Practice: Write a function add and print its result
  • Self-check: When can you use := short declaration?

4) Types & Variables (15–20 min)

  • Read: Types & Keywords, Variables & Constants
  • Do: Declare variables with var and :=
  • Practice: Write a small snippet using int, float64, and string
  • Self-check: What is a zero value for bool and string?

5) Control Flow (15–20 min)

  • Read: If/Else, Switch, For
  • Do: Sum numbers from 1 to 10
  • Practice: Print only even numbers using continue
  • Self-check: What’s the only loop keyword in Go?

6) Collections & Structs (20–25 min)

  • Read: Arrays, Slices, Maps, Structs
  • Do: Create a User struct and a slice of users
  • Practice: Iterate and print user names
  • Self-check: How do slices differ from arrays?

7) Methods & Interfaces (20–25 min)

  • Read: Methods & Receivers, Interfaces
  • Do: Give User a String() method
  • Practice: Implement a small interface and pass it into a function
  • Self-check: When do you prefer pointer receivers?

8) Files & JSON (20–25 min)

  • Read: Files & I/O, JSON Encoding/Decoding
  • Do: Save and read a JSON file with a struct
  • Practice: Add error handling and print friendly messages
  • Self-check: What is the purpose of struct tags like json:"name"?

9) Error Handling (15–20 min)

  • Read: Error Handling
  • Do: Wrap an error with fmt.Errorf("... %w", err)
  • Practice: Check for os.ErrNotExist with errors.Is
  • Self-check: Why avoid panic for normal control flow?

10) Concurrency (25–30 min)

  • Read: Goroutines & Channels, Select, Context
  • Do: Start a goroutine that sends a value on a channel
  • Practice: Add timeout with context.WithTimeout
  • Self-check: How do channels help avoid data races?

Capstone: Build a small service