crazybber / Go Pattern Examples
Licence: mit
Examples of implement for awesome go patterns including usual design patterns, in easy understanding examples.
Stars: ✭ 65
Programming Languages
go
31211 projects - #10 most used programming language
Projects that are alternatives of or similar to Go Pattern Examples
goodcode
A curated collection of annotated code examples from prominent open-source projects
Stars: ✭ 184 (+183.08%)
Mutual labels: patterns, examples, best-practices, design-patterns
Node.js Design Patterns Third Edition
Node.js Design Patterns Third Edition, published by Packt
Stars: ✭ 239 (+267.69%)
Mutual labels: examples, patterns, design-patterns
Org Formation Cli
Better than landingzones!
Stars: ✭ 471 (+624.62%)
Mutual labels: best-practices, patterns
Learning Rust
Rust 学习之路 > Rust Programming Tutorial, include articles, interview, example, problems.
Stars: ✭ 376 (+478.46%)
Mutual labels: example, examples
Reason Design Patterns
🗺 An unofficial collection of "design patterns" for Reason and OCaml
Stars: ✭ 379 (+483.08%)
Mutual labels: patterns, design-patterns
Rxjava2 Android Samples
RxJava 2 Android Examples - Migration From RxJava 1 to RxJava 2 - How to use RxJava 2 in Android
Stars: ✭ 4,950 (+7515.38%)
Mutual labels: example, examples
Cloud Design Patterns
Prescriptive Architecture Guidance for Cloud Applications
Stars: ✭ 484 (+644.62%)
Mutual labels: patterns, design-patterns
React Best Practices
A comprehensive reference guide to kickstart your React architecting career!
Stars: ✭ 566 (+770.77%)
Mutual labels: best-practices, patterns
Haxejs
Documentation about using JavaScript with Haxe
Stars: ✭ 25 (-61.54%)
Mutual labels: example, examples
Design Patterns
Contains examples of design patterns that implemented in php
Stars: ✭ 375 (+476.92%)
Mutual labels: examples, design-patterns
Go Patterns
Design patterns for the Go programming language
Stars: ✭ 432 (+564.62%)
Mutual labels: patterns, design-patterns
Vaporschool
Learn how to build vapor applications from rookie to champion in a constructive way!
Stars: ✭ 259 (+298.46%)
Mutual labels: example, examples
Designpatternslibrary
A comprehensive design patterns library implemented in C#, which covers various design patterns from the most commonly used ones to the lesser-known ones. Get familiar with and learn design patterns through moderately realistic examples.
Stars: ✭ 485 (+646.15%)
Mutual labels: patterns, design-patterns
Guardclauses
A simple package with guard clause extensions.
Stars: ✭ 767 (+1080%)
Mutual labels: patterns, design-patterns
Urf.core.sample
URF.Core Sample Solution - E2E sample built with ASP.NET Core, Entity Framework Core, URF.Core, Angular, Kendo UI & OData Core. Live demo: https://goo.gl/QpJVgd
Stars: ✭ 40 (-38.46%)
Mutual labels: best-practices, design-patterns
Examples Win32
Shows how to use Win32 controls by programming code (c++17).
Stars: ✭ 22 (-66.15%)
Mutual labels: examples, example
Golang工程模式示例集合(Go Patterns Examples)
包括了go-patterns 和golang-design-pattern中的全部模式
目前包括42种Go中常用的、面向工程化和最佳实践的模式/套路,自然也包含常见的23种设计模式,重点是这里全部是例子、通俗易懂,甚至每个模式下的例子,改一下名字,稍微再增加几行代码就可以直接用在项目和工程中了。
每一种设计模式都有其特定的应用场景和要解决的问题,了解模式的关键点就在于弄清这些目标场景和问题,千万不要纠结于:为什么这个模式叫这个名字,这个模式为啥要这样用? 要知道,最初,这些模式不是你总结的,也不是我的总结的,命名不由你我,如果是你我的写的,当然可以按照自己的喜欢的感觉给这些套路取名字,让其他人去费劲想
了解一下姿势 Ways
- 所谓模式就是套路,如功夫,招有定式
- 学习模式,就是学习套路,弄清楚套路要解决的目标场景,这很重要.
- 这里就是以实际代码示例展示设计模式,通俗易懂
- 除了常见的23种普适的设计模式,Go也有一些属于自己的模式
走起 Go
下载:
go https://github.com/crazybber/go-pattern-examples
跑一遍测试:
cd go-pattern-examples
go test ./...
行为型模式 Behavior Patterns
- [x] 备忘录模式(Memento)
- [x] 中介者模式(Mediator)
- [x] 闭包选项模式(Function Option)
- [x] 观察者模式(Observer)
- [x] 命令模式(Command)
- [x] 迭代器模式(Iterator)
- [x] 模板方法模式(Template Method)
- [x] 策略模式(Strategy)
- [x] 状态模式(State)
- [x] 访问者模式(Visitor)
- [x] 解释器模式(Interpreter)
- [x] 职责链模式(Chain of Responsibility)
创建型模式 Creation Patterns
- [x] New模式(New)
- [x] 简单工厂模式(Simple Factory)
- [x] 创建者模式(Builder)
- [x] 单例模式(Singleton)
- [x] 对象池模式(Object Pool)
- [x] 工厂方法模式(Factory Method)
- [x] 抽象工厂模式(Abstract Factory)
- [x] 原型模式(Prototype)
结构型模式 Structure Patterns
- [x] 外观模式(Facade)
- [x] 适配器模式(Adapter)
- [x] 桥模式(Bridge)
- [x] 复合模式(Composite)
- [x] 享元模式(Flyweight)
- [x] 装饰器模式(Decorator)
- [x] 代理模式(Proxy)
弹性模式 Resiliency Patterns
- [x] 熔断模式(circuit breaker)
- [x] 限流模式(rate limiting)
- [ ] [WIP]重试模式(retrier)
- [x] 最后期限模式(deadline)
更多模式(同步/并发/并行) Go More Patterns(Concurrency/Parallelism/Sync)
- [x] 发布订阅模式(Pub-Sub)
- [x] 时差模式(Time Profile)
- [x] 上下文模式(Context)
- [x] 扇入模式(Fan-In)
- [x] 扇出模式(Fan-Out)
- [ ] [WIP]信号量模式(Semaphore)
- [ ] [WIP]并行模式(Parallelism)
- [ ] [WIP]生成器模式(Generators)
- [ ] [WIP]屏障模式(N-Barrier)
- [ ] [WIP]有限并行模式(Bounded Parallelism)
- [ ] [WIP]批处理模式(batcher)
参考资料(Design patters Articles)
Patterns | Instructions | Status |
---|---|---|
go-patterns | 搜集整理到各种模式文章和代码 | p |
菜鸟设计模式 | 以Java为主的设计模式介绍 | p |
design_pattern | 编程之家的设计模式 | p |
golang-design-pattern | go语言的设计模式理论 | p |
go-resiliency | go的一些弹性模式 | m |
Behavioral | 设计模式中的行为模式(俄语版) | m |
go-patterns | 一些设计模式 | p |
go_design_pattern | 日语版设计模式 | p |
microsoft-patterns | 微软设计模式系列文章(24) | p/w |
更多 More
需要重新温习下Go基础?看这里
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].