Tagged articles

Bridge Pattern

2 articles · Page 1 of 1
Nullbody Notes
Nullbody Notes
Jan 7, 2021 · Fundamentals

Understanding the Bridge Pattern in Go: Decoupling Shapes and Pens

This article explains the Bridge design pattern in Go by defining its purpose, illustrating how Shape and Pen interfaces can be combined through a Bridge struct, and providing a complete Go code example that demonstrates interchangeable colors and shapes.

Bridge PatternDesign PatternsGo
0 likes · 3 min read
Understanding the Bridge Pattern in Go: Decoupling Shapes and Pens