Changelog Master Feed

Go code organization best practices (Go Time #225)

12 snips
Apr 14, 2022
Ask episode
AI Snips
Chapters
Transcript
Episode notes
ADVICE

Rule of Three

  • Avoid premature organization and abstraction.
  • Instead, copy and paste code until you've reused it multiple times.
ADVICE

Package Naming Heuristic

  • Create a good package name if code is reusable enough.
  • If the name becomes too long, keep the code where needed.
ADVICE

Internal Reusability

  • Keep reusable code within the project to limit responsibility.
  • Avoid creating standalone packages unless truly necessary.
Get the Snipd Podcast app to discover more snips from this episode
Get the app