{"product_id":"hexagonal-architecture-in-go-gabriel-anhaia-9798255744688","title":"Hexagonal Architecture in Go: Ports, Adapters, and Services That Last","description":"\u003cp\u003e\u003cb\u003eYour Go service's business logic should have zero knowledge of HTTP, databases, or message queues - and Go's implicit interfaces make this not just possible, but natural.\u003c\/b\u003e\u003c\/p\u003e\u003cp\u003eMost hexagonal architecture content comes from the Java world - full of dependency injection frameworks, abstract factories, and patterns that don't translate to Go. This book is different. It teaches hexagonal architecture \u003cb\u003ethe Go way\u003c\/b\u003e: with implicit interfaces, plain constructors, and a main() function as the composition root. No frameworks. No magic. Just Go.\u003c\/p\u003e\u003cp\u003e\u003cb\u003eIn 22 chapters across 5 parts, you'll: \u003c\/b\u003e\u003c\/p\u003e\u003cul\u003e\n\u003cli\u003eSee why Go services become unmaintainable - and the one architectural rule that prevents it\u003c\/li\u003e\n\u003cli\u003eMaster the core concepts: domain, ports, adapters, and the dependency rule\u003c\/li\u003e\n\u003cli\u003eBuild a complete order processing service from scratch with tested, production-ready code\u003c\/li\u003e\n\u003cli\u003eTest every layer: domain in microseconds, adapters with doubles, integration through HTTP\u003c\/li\u003e\n\u003cli\u003eHandle errors across boundaries, transactions without leaking SQL, and event-driven adapters\u003c\/li\u003e\n\u003cli\u003eAdd logging, metrics, and tracing via decorators - the domain stays pure\u003c\/li\u003e\n\u003cli\u003eKnow when hexagonal architecture is overkill and how to migrate existing services incrementally\u003c\/li\u003e\n\u003c\/ul\u003e\u003cp\u003eEvery code example is tested and available in a public companion repository. Every chapter builds on the last. Every pattern is grounded in real Go, not theory.\u003c\/p\u003e\u003cp\u003eWritten by a senior software engineer who builds Go services every day at a Berlin-based tech company. If you can write Go but struggle with organizing larger services, this book is for you.\u003c\/p\u003e\u003cp\u003eCompanion code: github.com\/gabrielanhaia\/hexagonal-go-examples\u003cbr\u003eThis is the 2026 revised \u0026amp; updated edition - the print layout has been corrected and the content improved throughout.\u003c\/p\u003e\u003cbr\u003e\u003cbr\u003e\u003cb\u003eAuthor:\u003c\/b\u003e Gabriel Anhaia\u003cbr\u003e\u003cb\u003eISBN-13:\u003c\/b\u003e 9798255744688\u003cbr\u003e\u003cb\u003ePublisher:\u003c\/b\u003e Independently Published\u003cbr\u003e\u003cb\u003eLanguage:\u003c\/b\u003e English\u003cbr\u003e\u003cb\u003ePublished:\u003c\/b\u003e 04\/09\/2026\u003cbr\u003e\u003cb\u003ePages:\u003c\/b\u003e 308\u003cbr\u003e\u003cb\u003eFormat:\u003c\/b\u003e Paperback\u003cbr\u003e\u003cb\u003eWeight:\u003c\/b\u003e 0.91lbs\u003cbr\u003e\u003cb\u003eSize:\u003c\/b\u003e 9.00h x 6.00w x 0.65d","brand":"Gabriel Anhaia","offers":[{"title":"Paperback","offer_id":49084138193151,"sku":"9798255744688","price":34.99,"currency_code":"USD","in_stock":true}],"url":"https:\/\/www.whiterainbookhouse.com\/products\/hexagonal-architecture-in-go-gabriel-anhaia-9798255744688","provider":"WR Book House","version":"1.0","type":"link"}