Blogs

In-depth posts on real Go and Rust problems, each with a fix and links to the full docs chapter.

Why Are Nested Go Modules Bad?

Title card for 'Why Are Nested Go Modules Bad?' with a short code example

A folder with its own go.mod is a separate module, not a package of the parent. The parent build skips it, and imports, tests, and versioning change.

Published on Oct 25, 2026

NI

Why Can I Never Remember Go Time Formats?

Title card for 'Why Can I Never Remember Go Time Formats?' with a short code example

Go formats time with an example date, not symbols like YYYY. Learn the reference time, read any layout, and stop guessing.

Published on Oct 25, 2026

NI

Why Did The Standard HTTP Router Feel Limited For So Long?

Title card for 'Why Did The Standard HTTP Router Feel Limited For So Long?' with a short code example

Before Go 1.22, ServeMux matched exact paths and subtrees only, so method checks and path parsing lived inside handlers.

Published on Oct 25, 2026

NI

Why Do Go Generics Feel Like A Type Puzzle?

Title card for 'Why Do Go Generics Feel Like A Type Puzzle?' with a short code example

Generics feel puzzling because every operation must be proved from the constraint, and the compiler infers types only from arguments, never from the result.

Published on Oct 25, 2026

NI

Why Do Go Modules Break When A Repo Moves?

Title card for 'Why Do Go Modules Break When A Repo Moves?' with a short code example

A repo move changes the module path, and the module path is the identity Go uses to find, version, and import the code.

Published on Oct 25, 2026

NI

Why Do I Need A Pointer Just To Say A Value Is Missing?

Title card for 'Why Do I Need A Pointer Just To Say A Value Is Missing?' with a short code example

A plain int cannot tell 0 from missing, because 0 is its zero value. A pointer adds nil, a separate missing state, with a nil check as its price.

Published on Oct 25, 2026

NI

Why Do Long-Time Go Users Say Go Is Losing Its Simplicity?

Title card for 'Why Do Long-Time Go Users Say Go Is Losing Its Simplicity?' with a short code example

Long-time users point to generics, modules, workspaces, and a larger standard library. The counter-view says the additions were optional and targeted.

Published on Oct 25, 2026

NI

Why Do My Goroutines Leak When I Range Over A Channel?

Title card for 'Why Do My Goroutines Leak When I Range Over A Channel?' with a short code example

A range over a channel ends only when the channel closes. If nothing closes it, the goroutine waits forever, and that waiting is the leak.

Published on Oct 25, 2026

NI

Why Do Teams Overuse Generics In Go?

Title card for 'Why Do Teams Overuse Generics In Go?' with a short code example

Teams overuse generics when one concrete type or a small interface would do. Learn the signals, the costs, and how to pull back.

Published on Oct 25, 2026

NI

Why Does Error Handling In Go Web Apps Feel So Awkward?

Title card for 'Why Does Error Handling In Go Web Apps Feel So Awkward?' with a short code example

Go handlers return no error, so every handler must turn a failure into a status, a safe message, and a log entry by hand.

Published on Oct 25, 2026

NI

Why Does Go Have No Built-In Generic Map And Filter?

Title card for 'Why Does Go Have No Built-In Generic Map And Filter?' with a short code example

Go has no built-in generic Map or Filter because a loop covers the common case, and generics let you write your own version in a few lines.

Published on Oct 25, 2026

NI

Why Does Go Have No Real Enums Or Option Type?

Title card for 'Why Does Go Have No Real Enums Or Option Type?' with a short code example

Go has no enum or Option type. Typed constants and iota cover the first half, and zero values, pointers, and comma-ok cover the second.

Published on Oct 25, 2026

NI

Why Does Go JSON Turn My Empty Slice Into Null?

Title card for 'Why Does Go JSON Turn My Empty Slice Into Null?' with a short code example

Go JSON writes null for a nil slice and [] for a non-nil empty slice, because the encoder checks nil, not length.

Published on Oct 25, 2026

NI

Why Does Go Mod Tidy Change Things I Did Not Expect?

Title card for 'Why Does Go Mod Tidy Change Things I Did Not Expect?' with a short code example

Tidy rewrites go.mod and go.sum to match the imports in your code, so additions, removals, and version changes all trace back to that rule.

Published on Oct 25, 2026

NI

Why Does Learning Go Feel Hard Even Though The Syntax Looks Simple?

Title card for 'Why Does Learning Go Feel Hard Even Though The Syntax Looks Simple?' with a short code example

Go looks small at first, but fluency comes from idioms, not syntax. This article maps that gap and gives a layered path through it.

Published on Oct 25, 2026

NI

Why Does My Go Program Deadlock On Select And Unbuffered Channels?

Title card for 'Why Does My Go Program Deadlock On Select And Unbuffered Channels?' with a short code example

An unbuffered send waits for a receiver, and a select with no ready case waits too, so a missing partner turns a wait into a deadlock.

Published on Oct 25, 2026

NI

Why Is Go Error Handling So Verbose?

Title card for 'Why Is Go Error Handling So Verbose?' with a short code example

Go error handling is verbose because every failure is a value that must be checked, wrapped, and decided at the point where it happens.

Published on Oct 25, 2026

NI

Why Is go.work So Frustrating?

Title card for 'Why Is go.work So Frustrating?' with a short code example

go.work is for local multi-module development, not for releases or consumers. This article shows where workspace mode changes builds, and how to keep it local.

Published on Oct 25, 2026

NI

Why Is Goroutine Lifetime So Manual In Go?

Title card for 'Why Is Goroutine Lifetime So Manual In Go?' with a short code example

Go gives a goroutine no parent, no kill switch, and no automatic end, so the code that starts it must also give it a way to stop.

Published on Oct 25, 2026

NI

Why Is GUI Development in Go Still Weak?

Title card for 'Why Is GUI Development in Go Still Weak?' with a short code example

Go ships no GUI toolkit in its standard library, so every desktop interface starts with a third party choice and a second stack to learn.

Published on Oct 25, 2026

NI

Why Is Private Go Module Access So Painful?

Title card for 'Why Is Private Go Module Access So Painful?' with a short code example

Private modules fail on the public path by design. This article explains the proxy, checksum, and authentication setup that makes them work.

Published on Oct 25, 2026

NI

Why Is There No Compile-Time Deadlock Detection In Go?

Title card for 'Why Is There No Compile-Time Deadlock Detection In Go?' with a short code example

Deadlock depends on runtime values, scheduling, and other goroutines, so the compiler cannot prove in advance that a wait will never end.

Published on Oct 25, 2026

NI

Why Is Writing Good Idiomatic Go Harder Than Writing Go That Compiles?

Title card for 'Why Is Writing Good Idiomatic Go Harder Than Writing Go That Compiles?' with a short code example

The compiler checks types and syntax, not readability. Idiom is the set of choices that make Go code clear to the next reader.

Published on Oct 25, 2026

NI

defer in a Go Loop: Why It's a Memory/Resource Leak Trap

Title card for 'defer in a Go Loop: Why It's a Memory/Resource Leak Trap' with a short code example

defer runs when the surrounding function returns, not when the loop iteration ends.

Published on Aug 16, 2026

NI

Go copy() vs append(): Which One Do You Actually Need?

Title card for 'Go copy() vs append(): Which One Do You Actually Need?' with a short code example

append grows a slice and returns a new header. copy writes into a destination you already sized and never grows it. Clone with make+copy.

Published on Aug 16, 2026

NI

Go Generics: comparable Constraint Explained With Real Examples

Title card for 'Go Generics: comparable Constraint Explained With Real Examples' with a short code example

comparable means == and !=, not <. Slices, maps, and functions never satisfy it. A struct is comparable only if every field is.

Published on Aug 16, 2026

NI

Go Method Values vs Method Expressions: What's Actually the Difference?

Title card for 'Go Method Values vs Method Expressions: What's Actually the Difference?' with a short code example

x.M binds the receiver now and yields func(args). T.M leaves the receiver as the first argument: func(T, args).

Published on Aug 16, 2026

NI

Go panic/recover vs Returning an Error: When to Use Which

Title card for 'Go panic/recover vs Returning an Error: When to Use Which' with a short code example

Return an error for expected failures the caller can handle. Panic for programmer bugs and process-killing startup.

Published on Aug 16, 2026

NI

Go Slice vs Array: When to Use Which

Title card for 'Go Slice vs Array: When to Use Which' with a short code example

Use a slice almost everywhere. Use an array when the length is part of the type, you want a full copy on assignment, or the value must be comparable with ==.

Published on Aug 16, 2026

NI

Go Type Assertion vs Type Switch: When to Use Each

Title card for 'Go Type Assertion vs Type Switch: When to Use Each' with a short code example

Assert when you need one type (use comma-ok unless you own the value). Switch when you branch on several types. Assertion panics without ok.

Published on Aug 16, 2026

NI

How Big Should a Go Interface Be?

Title card for 'How Big Should a Go Interface Be?' with a short code example

As small as the call site. One method is the default (io.Reader, fmt.Stringer).

Published on Aug 16, 2026

NI

How to Check If a Type Implements an Interface at Compile Time in Go

Title card for 'How to Check If a Type Implements an Interface at Compile Time in Go' with a short code example

Go has no implements keyword. Force the check with var _ I = (*T)(nil) (pointer methods) or var _ I = T{} (value methods).

Published on Aug 16, 2026

NI

How to Safely Do 2D Slices in Go Without the Footguns

Title card for 'How to Safely Do 2D Slices in Go Without the Footguns' with a short code example

[][]T is a slice of row headers, not a matrix type. make([][]int, rows) leaves nil rows. Initialize each row. Cap contiguous rows.

Published on Aug 16, 2026

NI

Named Return Values in Go: Useful Pattern or Anti-Pattern?

Title card for 'Named Return Values in Go: Useful Pattern or Anti-Pattern?' with a short code example

Name results when the signature documents the contract or a defer must write err. Bare return in a long function is the anti-pattern.

Published on Aug 16, 2026

NI

Understanding Go Slice Length vs Capacity (With Diagrams)

Title card for 'Understanding Go Slice Length vs Capacity (With Diagrams)' with a short code example

len is how many elements the slice currently shows. cap is how far the header can grow into the backing array without allocating. Indexing uses len.

Published on Aug 16, 2026

NI

Variadic Functions in Go: Common Mistakes and Gotchas

Title card for 'Variadic Functions in Go: Common Mistakes and Gotchas' with a short code example

A ...T parameter is a slice. Individual args allocate a new backing array. s... shares the caller's array. You cannot mix 1, s.... Zero args is nil, not empty.

Published on Aug 16, 2026

NI

Why Are Deferred Function Arguments Evaluated Immediately in Go?

Title card for 'Why Are Deferred Function Arguments Evaluated Immediately in Go?' with a short code example

defer queues the call, not the expressions. Arguments, the receiver, and the function value are evaluated when defer runs. Closures read variables later.

Published on Aug 16, 2026

NI

Why Did append() Not Update My Original Slice?

Title card for 'Why Did append() Not Update My Original Slice?' with a short code example

append always returns a new header. If you ignore the return, the caller's len stays the same.

Published on Aug 16, 2026

NI

Why Did Modifying One Go Slice Change Another?

Title card for 'Why Did Modifying One Go Slice Change Another?' with a short code example

A slice is a header that points at an array. Reslicing does not copy. Writes through one slice hit the same memory the other slice still sees.

Published on Aug 16, 2026

NI

Why Did My Closure Capture the Wrong Loop Variable?

Title card for 'Why Did My Closure Capture the Wrong Loop Variable?' with a short code example

A closure captures the variable, not a snapshot. Before Go 1.22 one loop variable was reused, so delayed closures all saw the last value.

Published on Aug 16, 2026

NI

Why Does My nil Interface Not Equal nil?

Title card for 'Why Does My nil Interface Not Equal nil?' with a short code example

An interface is nil only when both its type and its value are nil. Returning a nil concrete pointer boxed as error (or any interface) is not a nil interface.

Published on Aug 16, 2026

NI

Why Is My Go Slice Growing Unexpectedly?

Title card for 'Why Is My Go Slice Growing Unexpectedly?' with a short code example

append grows capacity in jumps, not one slot at a time. A tiny subslice can pin a huge backing array. Copy what you keep.

Published on Aug 16, 2026

NI

Why Should You Accept Interfaces, Return Structs in Go?

Title card for 'Why Should You Accept Interfaces, Return Structs in Go?' with a short code example

Parameters should name the methods you call, not *sql.DB. Return the concrete type you built so callers keep fields and extra methods.

Published on Aug 16, 2026

NI

Why Won't My Generic Type Satisfy This Interface in Go?

Title card for 'Why Won't My Generic Type Satisfy This Interface in Go?' with a short code example

Constraints are type sets. type ID int is not int unless you write ~int. Methods on *T do not put T in the set.

Published on Aug 16, 2026

NI

Go Pointer vs Value Receiver: Which Should You Use?

Title card for 'Go Pointer vs Value Receiver: Which Should You Use?' with a short code example

Use a pointer receiver if the method mutates the value, the type holds a mutex, or the struct is large.

Published on Aug 15, 2026

NI

Go Struct Embedding vs Composition: What's the Difference?

Title card for 'Go Struct Embedding vs Composition: What's the Difference?' with a short code example

Embedding is composition with field and method promotion. A named field is composition without that shorthand.

Published on Aug 15, 2026

NI

nil Pointer Dereference in Go: How to Actually Debug It

Title card for 'nil Pointer Dereference in Go: How to Actually Debug It' with a short code example

The panic is runtime error: invalid memory address or nil pointer dereference.

Published on Aug 15, 2026

NI

Why Are My Struct Fields Not Comparable with ==?

Title card for 'Why Are My Struct Fields Not Comparable with ==?' with a short code example

A struct is comparable with == only if every field is comparable. A slice, map, or function field makes the whole type illegal for == and unusable as a map key.

Published on Aug 15, 2026

NI

Why Can't I Take the Address of a Map Value in Go?

Title card for 'Why Can't I Take the Address of a Map Value in Go?' with a short code example

Map index expressions are not addressable. Go maps grow by moving buckets, so a pointer to m[k] would dangle.

Published on Aug 15, 2026

NI

Why Did My Struct Change Inside a Function But Not Outside?

Title card for 'Why Did My Struct Change Inside a Function But Not Outside?' with a short code example

Go copies structs when you pass them to a function. Mutations hit the copy, not the caller. Use a pointer (or return the new value) if the change must stick.

Published on Aug 15, 2026

NI

Why Does new() Behave Differently From a Struct Literal in Go?

Title card for 'Why Does new() Behave Differently From a Struct Literal in Go?' with a short code example

new(T) returns a non-nil *T pointing at a zero T. T{} is a T value. &T{Field: x} sets fields. Since Go 1.26, new(expr) can set the value too.

Published on Aug 15, 2026

NI

Why Is My Embedded Field's Method Not Being Called?

Title card for 'Why Is My Embedded Field's Method Not Being Called?' with a short code example

Promoted methods still run on the inner value. An outer method with the same name shadows them; it does not override.

Published on Aug 15, 2026

NI

Rust Ownership: Why Did My Value Move?

Title card for 'Rust Ownership: Why Did My Value Move?' with a short code example

Fix "borrow of moved value" in Rust. Learn when a value moves, when it is copied, and when to borrow or clone instead.

Published on Jun 7, 2026

NI