File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ type MulDecorator struct {
15
15
num int
16
16
}
17
17
18
- func WarpMulDecorator (c Component , num int ) Component {
18
+ func WrapMulDecorator (c Component , num int ) Component {
19
19
return & MulDecorator {
20
20
Component : c ,
21
21
num : num ,
@@ -31,7 +31,7 @@ type AddDecorator struct {
31
31
num int
32
32
}
33
33
34
- func WarpAddDecorator (c Component , num int ) Component {
34
+ func WrapAddDecorator (c Component , num int ) Component {
35
35
return & AddDecorator {
36
36
Component : c ,
37
37
num : num ,
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ import "fmt"
4
4
5
5
func ExampleDecorator () {
6
6
var c Component = & ConcreteComponent {}
7
- c = WarpAddDecorator (c , 10 )
8
- c = WarpMulDecorator (c , 8 )
7
+ c = WrapAddDecorator (c , 10 )
8
+ c = WrapMulDecorator (c , 8 )
9
9
res := c .Calc ()
10
10
11
11
fmt .Printf ("res %d\n " , res )
You can’t perform that action at this time.
0 commit comments