From 1064ec934fe59fe185b7b88c5a3926acd51cb9ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E5=AE=9D?= Date: Thu, 6 Dec 2018 12:24:06 +0800 Subject: [PATCH] update --- README.md | 2 +- mediator-pattern/main.go | 27 --------------------------- 2 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 mediator-pattern/main.go diff --git a/README.md b/README.md index 60f40c5..0b62a49 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ 6. [备忘录模式](https://github.com/silsuer/golang-design-patterns/tree/master/memento-pattern) - 7. 中介者模式 + 7. [中介者模式](https://github.com/silsuer/golang-design-patterns/tree/master/mediator-pattern) 8. 迭代器模式 diff --git a/mediator-pattern/main.go b/mediator-pattern/main.go deleted file mode 100644 index 17661c7..0000000 --- a/mediator-pattern/main.go +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import "fmt" - -// 中介者接口 -type IMediator interface { - Notify(c IClient) // 接受通知 -} - -// 客户端接口 -type IClient interface { - Column() -} - -// 具体中介者,定义关联关系 -type Mediator struct { - From IClient - To IClient -} - -func (m *Mediator) Notify(c IClient) { - // 会通知所有 -} - -func main() { - fmt.Println(1) -}