5min chapter

Changelog Master Feed cover image

Domain-driven design with Go (Go Time #273)

Changelog Master Feed

CHAPTER

The Importance of Internal Packages in Demand-Driven Design

Go lets you put your own language in a folder called internal. And that essentially means this is for this area only don't import this elsewhere. So inside the internal projects, you would then make how I typically do it as he'd have like in this instance, like a let's see the coffee shop example. You may have a loyalty team inside loyalty.go or something similar. The main dot go tells you this is the main place to look at these files. If you had just everything was called like models.go or handlers.go inside these packages, when you're sort of navigating the files quickly, you have to do a bit more work to find out what's going on there

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode