Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 587 Bytes

abstraction.md

File metadata and controls

25 lines (17 loc) · 587 Bytes

Overview

  1. How to structure reusable code files in larger projects
  2. See modeling doc

Idioms

  1. Package is the level of abstration
  2. One purpose/responsibility per file
  3. Files in package work together

Compare to Java

Java Golang
Class is unit of abstraction Package is unit of abstraction
Relying on package scope is uncommon Package scope is heavily used
Packages are nested Packages are flat

TODO/Unorganized

  • TODO: packages

Other Resources

  1. https://www.practical-go-lessons.com/chap-40-design-recommendations#source-files