Programming Languages

Learn Go

95 short lessons with interactive exercises. You start from zero and move from beginner to advanced.

  • 95 lessons
  • 3 levels
  • Arabic & English
  • Start free

What you will learn

  • Write Go programs using types, control flow, functions and packages
  • Use slices, maps, structs, pointers, interfaces and error handling
  • Organize a project with modules and generics, and write tests
  • Build safe concurrency with goroutines, channels, Context and HTTP servers

About this course

A complete Go course from scratch: you start with the basics — variables, types, conditions, loops and functions — then move on to slices, maps, structs, pointers, interfaces and error handling, all the way to modules, generics, concurrency with goroutines and channels, Context, HTTP servers and testing. Go is a fast, compiled language made for servers, tools and cloud systems.

Skills

  • Go
  • Server Programming
  • Concurrency
  • Cloud Systems

Lessons

Every lesson is short, and the exercises after it lock in what you learned.

Beginner level

28 lessons
  1. Introduction to Go
  2. How a Go Program Works
  3. Your First Program in Go
  4. The main package and the main function
  5. Printing with fmt.Println
  6. Comments in Code
  7. Variables
  8. Short Declaration with :=
  9. Constants
  10. Basic Types
  11. Zero Values
  12. Type Conversion
  13. Strings
  14. Working with characters using rune
  15. Arithmetic Operators
  16. Assignment Operators
  17. Increment and Decrement
  18. Comparison Operators
  19. Logical operators
  20. Conditions with if and else
  21. Multiple conditions with else if
  22. Choosing with switch
  23. The for loop
  24. Using for as a while loop
  25. Loop Control: break and continue
  26. Defining and Calling Functions
  27. Function Parameters
  28. Return Values

Intermediate level

32 lessons
  1. Multiple Return Values
  2. Named Return Values
  3. Variadic Functions
  4. Functions as Values
  5. Anonymous Functions
  6. Closures
  7. Arrays
  8. Slices
  9. Working with Slice Elements
  10. Adding elements with append
  11. Slicing
  12. Looping with range
  13. Maps
  14. Working with map elements
  15. Structs
  16. Creating Struct Values
  17. Struct Embedding
  18. Methods
  19. Pointers
  20. Passing Pointers to Functions
  21. Value and Pointer Receivers
  22. Interfaces
  23. Automatic Interface Implementation
  24. The Empty Interface & any
  25. Type Assertion
  26. Type Switch
  27. Handling errors with error
  28. Creating Errors
  29. Error wrapping with %w
  30. Deferring execution with defer
  31. Handling panic and recover
  32. Packages & Import

Advanced level

35 lessons
  1. Go modules
  2. Package Organization
  3. Exported Identifiers
  4. Working with Files
  5. Reading & Writing Files
  6. Working with JSON
  7. Struct Tags
  8. Generics
  9. Type Parameters
  10. Type Constraints
  11. Introduction to Concurrency
  12. Running Tasks with Goroutines
  13. Channels
  14. Channel Communication
  15. Buffered Channels
  16. Closing channels
  17. Channel Iteration
  18. Waiting on several channels with select
  19. select with Timeout
  20. Waiting for goroutines with WaitGroup
  21. Protecting data with a Mutex
  22. Read-Write Locks: RWMutex
  23. Running an Operation Once with sync.Once
  24. Using Context
  25. Canceling Operations with Context
  26. Timeouts with context.WithTimeout
  27. Working with HTTP
  28. Sending HTTP Requests
  29. Reading HTTP Responses
  30. Creating an HTTP Server
  31. HTTP Routing
  32. JSON over HTTP
  33. Testing Functions
  34. Table-Driven Tests
  35. Benchmarking

Start your first lesson today

Get the Lammah app and pick “Learn Go” from the courses. Each lesson takes a few minutes, and you can start free.

Learn tech skills easily, for freeGet the app