go-patterns

module
v0.0.0-...-6db54d9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2021 License: MIT

README

Паттерны проектирования с примерами на Golang

Это коллекция из 22 популярных паттернов проектирования с примерами кода на языке Go и кратким описанием паттерна.

В кратких описаниях будут употребляться классические термины, такие как Класс, Объект, Абстрактный Класс. Применимо к языку Go, это Тип, Значение этого типа и Интерфейс (где это возможно).

Умение правильно использовать шаблоны проектирования, так сказать, в нужном месте и в нужное время, помогут сохранить ваши нервные клетки.

Установка

Вы можете скачать этот репозиторий и запустить тесты

$ go get github.com/alexandergrom/go-patterns

Паттерны

Порождающие (Creational)

Структурные (Structural)

Поведенческие (Behavioral)

-- THE END --

Directories

Path Synopsis
Behavioral
ChainOfResponsibility
Package chain_of_responsibility is an example of the Chain Of Responsibility Pattern.
Package chain_of_responsibility is an example of the Chain Of Responsibility Pattern.
Command
Package command is an example of the Command Pattern.
Package command is an example of the Command Pattern.
Iterator
Package iterator is an example of the Iterator Pattern.
Package iterator is an example of the Iterator Pattern.
Mediator
Package mediator is an example of the Mediator Pattern.
Package mediator is an example of the Mediator Pattern.
Memento
Package memento is an example of the Memento Pattern.
Package memento is an example of the Memento Pattern.
Observer
Package observer is an example of the Observer Pattern.
Package observer is an example of the Observer Pattern.
State
Package state is an example of the State Pattern.
Package state is an example of the State Pattern.
Strategy
Package strategy is an example of the Strategy Pattern.
Package strategy is an example of the Strategy Pattern.
TemplateMethod
Package template_method is an example of the Template Method Pattern.
Package template_method is an example of the Template Method Pattern.
Visitor
Package visitor is an example of the Visitor Pattern.
Package visitor is an example of the Visitor Pattern.
Creational
AbstractFactory
Package abstract_factory is an example of the Abstract Factory Pattern.
Package abstract_factory is an example of the Abstract Factory Pattern.
Builder
Package builder is an example of the Builder Pattern.
Package builder is an example of the Builder Pattern.
FactoryMethod
Package factory_method is an example of the Factory Method pattern.
Package factory_method is an example of the Factory Method pattern.
Prototype
Package prototype is an example of the Singleton Pattern.
Package prototype is an example of the Singleton Pattern.
Singleton
Package singleton is an example of the Singleton Pattern.
Package singleton is an example of the Singleton Pattern.
Structural
Adapter
Package adapter is an example of the Adapter Pattern.
Package adapter is an example of the Adapter Pattern.
Bridge
Package bridge is an example of the Bridge Pattern.
Package bridge is an example of the Bridge Pattern.
Composite
Package composite is an example of the Composite Pattern.
Package composite is an example of the Composite Pattern.
Decorator
Package decorator is an example of the Decorator Pattern.
Package decorator is an example of the Decorator Pattern.
Facade
Package facade is an example of the Facade Pattern.
Package facade is an example of the Facade Pattern.
Flyweight
Package flyweight is an example of the Flyweight Pattern.
Package flyweight is an example of the Flyweight Pattern.
Proxy
Package proxy is an example of the Adapter Pattern.
Package proxy is an example of the Adapter Pattern.
Unsorted

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL