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) -}