Skip to main content

Black Friday Sale

40% Off All Training Bundles

Self-paced Go, Rust, Docker, and Kubernetes training from Ardan Labs instructors, with a full year of access to every course in your bundle.

Browse the Bundles

50,000+ engineerstrained by Ardan Labs

Trusted by 1,800+ companies worldwide

Training Bundles

1-year access · New course updates · Certificate for every course

Core Bundles

One language or platform, from beginner to advanced.

Performance Bundles

Go or Rust paired with Docker and Kubernetes.

Mastery Bundle

The full Go, Rust, Docker, and Kubernetes catalog.

Most popular!

Team pricing

Training a team of engineers?

Group pricing is available for teams of any size, on every bundle above. Tell us how many engineers you're training and a training advisor will follow up with options and pricing.

No commitment. Self-paced bundles for individuals and teams.

Spot the Bug: Go Edition

Can You Spot the Bug?

Three real Go behaviors that trip up experienced engineers. Think it through, then reveal the answer.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
package main

import "fmt"

type User struct{}

func getUser() *User { return nil }

func main() {
    var value any = getUser()
    fmt.Println(value == nil)
}
Intermediate Interfaces and typed nil values

The Nil Interface Trap

This function returns a nil pointer. So why does the program print false?

Think it through before you reveal the answer.

Reveal the answer

A typed nil inside an interface.

In Go, an interface value holds both a dynamic type and a dynamic value. getUser() returns a nil *User, but once it’s assigned to any, the interface holds:

  • Dynamic type: *User
  • Dynamic value: nil

Because the interface has a dynamic type, the interface itself isn’t nil, so the comparison returns false. This comes up constantly with error handling, where a function returns a typed nil error.

The lesson: Understand what an interface contains before relying on nil comparisons.

Go deeper with the Ultimate Go Bundle, 40% off

Also on sale: live workshops

Learn to direct AI agents, live with Ardan Labs instructors

Building Rust with AI with Herbert Wolverson runs December 9th & 10th, and Practical Development with AI Agents with Miki Tebeka runs December 15th & 16th.

See the Workshops

Trusted by engineers

Training Engineers Actually Recommend

Don't just take our word for it. Here's what engineers say after working through our courses.

“Thanks Ardan Labs for a great Ultimate Go class! Bill is a great teacher and I'm definitely more productive in Go now.”
Steve Francia Ultimate Go