Skip to content

Commit 1d40661

Browse files
author
Jarry
committed
update readme
1 parent 8cb37f8 commit 1d40661

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

bridge-pattern/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public interface DrawTool {
6767

6868
## 定义工具实现类,可以多个
6969
```java
70-
// 画圆A,实现了图画基础API
70+
// DrawStyeA.java 画圆A,实现了图画基础API
7171
public class DrawStyeA implements DrawTool {
7272
@Override
7373
public void drawStyle() {
@@ -77,7 +77,7 @@ public class DrawStyeA implements DrawTool {
7777
```
7878

7979
```java
80-
// 画圆B,实现了图画基础API
80+
// DrawStyleB.java 画圆B,实现了图画基础API
8181
public class DrawStyleB implements DrawTool {
8282
@Override
8383
public void drawStyle() {
@@ -88,7 +88,6 @@ public class DrawStyleB implements DrawTool {
8888

8989
## 测试调用
9090
```java
91-
9291
/**
9392
* 桥接模式是将基础抽象类作为桥接器,用来连接业务对象和具体动作,将两者充分解耦。
9493
* 具体对象以抽象对象为父类,实现父类方法。

observer-pattern/go/src/ObserverAPI.go

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,4 @@ type ObserverAPI interface {
66
GetName() string
77
SetName(name string)
88
Update(content string)
9-
}
10-
11-
// constructor(name) {
12-
// this.name = name || this.constructor.name
13-
// }
14-
15-
// // 观察者发出更新通知,观察者自行监听
16-
// update(content) {
17-
// fmt.Println(`${this.constructor.name}::update() [content = ${content}]`)
18-
// }
19-
20-
// setName(name) {
21-
// this.name = name
22-
// }
23-
// }
9+
}

0 commit comments

Comments
 (0)