Injecting a Clock in Go: Testable Time in Your Hexagonal Domain
📰 Dev.to · Gabriel Anhaia
Kill time.Now() calls buried in Go business logic. A Clock port, a real adapter, a fake, and tests that stop flaking on midnight.
Kill time.Now() calls buried in Go business logic. A Clock port, a real adapter, a fake, and tests that stop flaking on midnight.