Book: Hexagonal Architecture in Go Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub You write a PHPUnit test. The class under test depends on UserService . You type $this->createMock(UserService::class) . Green. Next test. You move to Go. You try the same move. The compiler refuses. You cannot mock a *UserService . There is no subclass to override, no proxy to wrap, no magic to bend. The only path forward is to extract an interface, change the caller to accept that interface, and pass a fake. That feels like extra work. It is not. That is the design step PHP let you skip. The PHPUnit move that hides the seam Here is the kind of test that ships every day in PHP shops. A controller calls a service. The service hits the database. The test mocks the service.…