We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Clear
1 parent bf8f0f4 commit 37a74f4Copy full SHA for 37a74f4
session.go
@@ -35,6 +35,13 @@ func (s *Session) Delete(name interface{}) {
35
delete(s.Session.Values, name)
36
}
37
38
+// Clear the current session
39
+func (s *Session) Clear() {
40
+ for k, _ := range s.Session.Values {
41
+ delete(s.Session.Values, k)
42
+ }
43
+}
44
+
45
// Get a session using a request and response.
46
func (a *App) getSession(r *http.Request, w http.ResponseWriter) *Session {
47
session, _ := a.SessionStore.Get(r, a.SessionName)
0 commit comments