Skip to content

Commit d1e9e00

Browse files
committed
add options
1 parent a813d07 commit d1e9e00

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

design/options/options.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ import (
44
"time"
55
)
66

7+
/**
8+
1. 需要Option选项得对象,里面是每一个配置
9+
2. 需要一个Option得接口,拥有一个设置option得函数
10+
3. 需要一个自定义类型得func,实现了Option接口
11+
4. func要返回一个Option类型得接口,并且参数为要设置得内容
12+
*/
13+
714
type Connection struct {
815
addr string
916
cache bool

0 commit comments

Comments
 (0)