From 8164f9821d26d9286af3a63f03348e69446594c0 Mon Sep 17 00:00:00 2001 From: luosangnanka Date: Mon, 5 May 2014 16:13:03 +0800 Subject: [PATCH 1/3] Update README.md Update the json format of session for redis, there is an error in that json string --- session/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/session/README.md b/session/README.md index 2ebf069a..1956738d 100644 --- a/session/README.md +++ b/session/README.md @@ -42,7 +42,7 @@ Then in you web app init the global session manager * Use **Redis** as provider, the last param is the Redis conn address,poolsize,password: func init() { - globalSessions, _ = session.NewManager("redis", `{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig","127.0.0.1:6379,100,astaxie"}`) + globalSessions, _ = session.NewManager("redis", `{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig":"127.0.0.1:6379,100,astaxie"}`) go globalSessions.GC() } From a56f67e07352a6890c8d98524aeefa90911c70b5 Mon Sep 17 00:00:00 2001 From: luosangnanka Date: Mon, 5 May 2014 16:15:49 +0800 Subject: [PATCH 2/3] Update README.md Update the json format of session for file, redis, mysql, there are errors in these json string, after `ProviderConfig` params. --- session/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/session/README.md b/session/README.md index 1956738d..56b46bdd 100644 --- a/session/README.md +++ b/session/README.md @@ -35,7 +35,7 @@ Then in you web app init the global session manager * Use **file** as provider, the last param is the path where you want file to be stored: func init() { - globalSessions, _ = session.NewManager("file",`{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig","./tmp"}`) + globalSessions, _ = session.NewManager("file",`{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig":"./tmp"}`) go globalSessions.GC() } @@ -50,7 +50,7 @@ Then in you web app init the global session manager func init() { globalSessions, _ = session.NewManager( - "mysql", `{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig","username:password@protocol(address)/dbname?param=value"}`) + "mysql", `{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig":"username:password@protocol(address)/dbname?param=value"}`) go globalSessions.GC() } From 25768f01093833e2dbd08748051d1cbb8b95c930 Mon Sep 17 00:00:00 2001 From: luosangnanka Date: Mon, 5 May 2014 16:21:50 +0800 Subject: [PATCH 3/3] Update README.md Update the json format of session for file, redis, mysql, cookie, there are errors in these json string, such as after the param `ProviderConfig` and there is a lost of `"` in the line 61 of the `gclifetime`. --- session/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/session/README.md b/session/README.md index 56b46bdd..6d0a297e 100644 --- a/session/README.md +++ b/session/README.md @@ -58,7 +58,7 @@ Then in you web app init the global session manager func init() { globalSessions, _ = session.NewManager( - "cookie", `{"cookieName":"gosessionid","enableSetCookie":false,gclifetime":3600,"ProviderConfig":"{\"cookieName\":\"gosessionid\",\"securityKey\":\"beegocookiehashkey\"}"}`) + "cookie", `{"cookieName":"gosessionid","enableSetCookie":false,"gclifetime":3600,"ProviderConfig":"{\"cookieName\":\"gosessionid\",\"securityKey\":\"beegocookiehashkey\"}"}`) go globalSessions.GC() }