{"action":"created","issue":{"url":"https://api.github.com/repos/gin-contrib/sessions/issues/65","repository_url":"https://api.github.com/repos/gin-contrib/sessions","labels_url":"https://api.github.com/repos/gin-contrib/sessions/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/gin-contrib/sessions/issues/65/comments","events_url":"https://api.github.com/repos/gin-contrib/sessions/issues/65/events","html_url":"https://github.com/gin-contrib/sessions/issues/65","id":341594792,"node_id":"MDU6SXNzdWUzNDE1OTQ3OTI=","number":65,"title":"About the error eater.","user":{"login":"arlendotcn","id":6712608,"node_id":"MDQ6VXNlcjY3MTI2MDg=","avatar_url":"https://avatars0.githubusercontent.com/u/6712608?v=4","gravatar_id":"","url":"https://api.github.com/users/arlendotcn","html_url":"https://github.com/arlendotcn","followers_url":"https://api.github.com/users/arlendotcn/followers","following_url":"https://api.github.com/users/arlendotcn/following{/other_user}","gists_url":"https://api.github.com/users/arlendotcn/gists{/gist_id}","starred_url":"https://api.github.com/users/arlendotcn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arlendotcn/subscriptions","organizations_url":"https://api.github.com/users/arlendotcn/orgs","repos_url":"https://api.github.com/users/arlendotcn/repos","events_url":"https://api.github.com/users/arlendotcn/events{/privacy}","received_events_url":"https://api.github.com/users/arlendotcn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-16T16:45:49Z","updated_at":"2018-08-14T06:50:24Z","closed_at":null,"author_association":"NONE","body":"In real production, every error is important, but this project eats some errors:\r\n```go\r\nfunc (s *session) Session() *sessions.Session {\r\n\tif s.session == nil {\r\n\t\tvar err error\r\n\t\ts.session, err = s.store.Get(s.request, s.name)\r\n\t\t// error eater here\r\n\t\tif err != nil {\r\n\t\t\tlog.Printf(errorFormat, err)\r\n\t\t}\r\n\t}\r\n\treturn s.session\r\n}\r\n```\r\nand it makes whole Session interface not reliable:\r\n```go\r\ntype Session interface {\r\n\t// Get returns the session value associated to the given key.\r\n\tGet(key interface{}) interface{}\r\n\t// Set sets the session value associated to the given key.\r\n\tSet(key interface{}, val interface{})\r\n\t// Delete removes the session value associated to the given key.\r\n\tDelete(key interface{})\r\n\t// Clear deletes all values in the session.\r\n\tClear()\r\n\t// AddFlash adds a flash message to the session.\r\n\t// A single variadic argument is accepted, and it is optional: it defines the flash key.\r\n\t// If not defined \"_flash\" is used by default.\r\n\tAddFlash(value interface{}, vars ...string)\r\n\t// Flashes returns a slice of flash messages from the session.\r\n\t// A single variadic argument is accepted, and it is optional: it defines the flash key.\r\n\t// If not defined \"_flash\" is used by default.\r\n\tFlashes(vars ...string) []interface{}\r\n\t// Options sets confuguration for a session.\r\n\tOptions(Options)\r\n\t// Save saves all sessions used during the current request.\r\n\tSave() error\r\n}\r\n```\r\nso, in my project, i do need to rewrite it to get the error of memcached/redis server down, and make sure our users will not get any broken contents.\r\n\r\nmaybe golang's error is realy boring, but an error eater would be a serious problem too.\r\n\r\ni'd forked and modified it for match my project's requirement: [commit record](https://github.com/arlendotcn/sessions/commit/8dbe0e9063039e8b7bf74bb29fbe0d6c4108f108)"},"comment":{"url":"https://api.github.com/repos/gin-contrib/sessions/issues/comments/412772265","html_url":"https://github.com/gin-contrib/sessions/issues/65#issuecomment-412772265","issue_url":"https://api.github.com/repos/gin-contrib/sessions/issues/65","id":412772265,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjc3MjI2NQ==","user":{"login":"arlendotcn","id":6712608,"node_id":"MDQ6VXNlcjY3MTI2MDg=","avatar_url":"https://avatars0.githubusercontent.com/u/6712608?v=4","gravatar_id":"","url":"https://api.github.com/users/arlendotcn","html_url":"https://github.com/arlendotcn","followers_url":"https://api.github.com/users/arlendotcn/followers","following_url":"https://api.github.com/users/arlendotcn/following{/other_user}","gists_url":"https://api.github.com/users/arlendotcn/gists{/gist_id}","starred_url":"https://api.github.com/users/arlendotcn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arlendotcn/subscriptions","organizations_url":"https://api.github.com/users/arlendotcn/orgs","repos_url":"https://api.github.com/users/arlendotcn/repos","events_url":"https://api.github.com/users/arlendotcn/events{/privacy}","received_events_url":"https://api.github.com/users/arlendotcn/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T06:50:24Z","updated_at":"2018-08-14T06:50:24Z","author_association":"NONE","body":"@kelp404 a pull-request created: https://github.com/gin-contrib/sessions/pull/69"}}
{"actor":{"display_login":"arlendotcn"}}