Skip to content

Commit 9a35ff8

Browse files
committed
Merge pull request astaxie#221 from qinhanlei/patch-5
Update 06.2.md
2 parents f726c34 + cf53003 commit 9a35ff8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ebook/06.2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Go实现整个的流程应该也是这样的,在main包中创建一个全局
5353
var globalSessions *session.Manager
5454
//然后在init函数中初始化
5555
func init() {
56-
globalSessions = NewManager("memory","gosessionid",3600)
56+
globalSessions, _ = NewManager("memory","gosessionid",3600)
5757
}
5858

5959
我们知道session是保存在服务器端的数据,它可以以任何的方式存储,比如存储在内存、数据库或者文件中。因此我们抽象出一个Provider接口,用以表征session管理器底层存储结构。

0 commit comments

Comments
 (0)