Study how classic design patterns like Observer, Strategy, or Singleton look when implemented in Go.
Use as a quick reference when adding a Decorator or Proxy pattern to your own Go project.
Learn software design patterns for the first time using real working code alongside a textbook.
Compare multiple patterns side by side to decide which one fits your current architecture problem.
This repository is a collection of example code in Go that demonstrates classic software design patterns. Design patterns are reusable solutions to common problems that come up repeatedly when building software. Rather than inventing a new approach every time, developers use these named patterns as a shared vocabulary and starting point. The repository is described as reading notes from the book "Research on Design Patterns" and covers 23 patterns organized into three categories. The first category, creational patterns, covers ways to create objects: Simple Factory, Factory Method, Abstract Factory, Builder, Prototype, and Singleton. The second category, structural patterns, covers how to organize or combine components: Facade, Adapter, Proxy, Composite, Flyweight, Decorator, and Bridge. The third category, behavioral patterns, covers how components communicate and coordinate: Mediator, Observer, Command, Iterator, Template Method, Strategy, State, Memento, Interpreter, Chain of Responsibility, and Visitor. Each pattern has its own folder in the repository containing Go code that shows how to implement it. The README is written in Chinese and serves mainly as an index linking to each of the 23 pattern folders on GitHub. This is primarily a learning resource. If you are studying Go and want to understand how established design patterns look when written in Go specifically, or if you are learning design patterns for the first time and want working code examples alongside your reading, this repository provides a concise reference.
← senghoo on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.