diff options
author | Matt Silverlock <matt@eatsleeprepeat.net> | 2015-08-06 10:39:54 +0300 |
---|---|---|
committer | Matt Silverlock <matt@eatsleeprepeat.net> | 2015-08-06 10:39:54 +0300 |
commit | 460e18584b819b2ffc92706c71e9c4791aba65ea (patch) | |
tree | bf053ec315d74f6a457451b51e3eb65e7fed52bc /sessions.go | |
parent | 286213d1c4d3c5f7ca906279577b126e58fb933c (diff) |
Improved docs re: calling Save before writing/returning.
Diffstat (limited to 'sessions.go')
-rw-r--r-- | sessions.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sessions.go b/sessions.go index 53111b3..d6bfb6e 100644 --- a/sessions.go +++ b/sessions.go @@ -88,7 +88,8 @@ func (s *Session) AddFlash(value interface{}, vars ...string) { } // Save is a convenience method to save this session. It is the same as calling -// store.Save(request, response, session) +// store.Save(request, response, session). You should call Save before writing to +// the response or returning from the handler. func (s *Session) Save(r *http.Request, w http.ResponseWriter) error { return s.store.Save(r, w, s) } |