Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

Summary

In the first section of this chapter, The SOLID principles of object-oriented design, we performed a deep dive into each of the SOLID principles and how they can be applied toward writing clean Go code:

  • SRP: Group structs and functions based on their purpose and organize them into packages with clear logical boundaries.
  • Open/Closed principle: Use composition and embedding of simple types to construct more complex types that still retain the same implicit interface as the types they consist of.
  • LSP: Avoid unnecessary coupling by using interfaces rather than concrete types to define the contract between packages.
  • ISP: Make sure your function or method signatures only depend on the behaviors they need and nothing more; use the smallest ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content