Update README.md
Update the json format of session for file, redis, mysql, there are errors in these json string, after `ProviderConfig` params.
Showing
1 changed file
with
2 additions
and
2 deletions
| ... | @@ -35,7 +35,7 @@ Then in you web app init the global session manager | ... | @@ -35,7 +35,7 @@ Then in you web app init the global session manager |
| 35 | * Use **file** as provider, the last param is the path where you want file to be stored: | 35 | * Use **file** as provider, the last param is the path where you want file to be stored: |
| 36 | 36 | ||
| 37 | func init() { | 37 | func init() { |
| 38 | globalSessions, _ = session.NewManager("file",`{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig","./tmp"}`) | 38 | globalSessions, _ = session.NewManager("file",`{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig":"./tmp"}`) |
| 39 | go globalSessions.GC() | 39 | go globalSessions.GC() |
| 40 | } | 40 | } |
| 41 | 41 | ||
| ... | @@ -50,7 +50,7 @@ Then in you web app init the global session manager | ... | @@ -50,7 +50,7 @@ Then in you web app init the global session manager |
| 50 | 50 | ||
| 51 | func init() { | 51 | func init() { |
| 52 | globalSessions, _ = session.NewManager( | 52 | globalSessions, _ = session.NewManager( |
| 53 | "mysql", `{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig","username:password@protocol(address)/dbname?param=value"}`) | 53 | "mysql", `{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig":"username:password@protocol(address)/dbname?param=value"}`) |
| 54 | go globalSessions.GC() | 54 | go globalSessions.GC() |
| 55 | } | 55 | } |
| 56 | 56 | ... | ... |
-
Please register or sign in to post a comment