We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f662658 commit 2cd5a0aCopy full SHA for 2cd5a0a
Session.go
@@ -67,9 +67,13 @@ func (session *Session) Modified() bool {
67
return session.modified
68
}
69
70
-// Data returns the underlying session data.
71
-// READING OR WRITING DATA IS NOT THREAD-SAFE.
72
-// Use Set() and Get() to modify data safely.
+// Data returns a copy of the underlying session data.
73
func (session *Session) Data() map[string]interface{} {
74
- return session.data
+ newMap := map[string]interface{}{}
+
+ for key, value := range session.data {
75
+ newMap[key] = value
76
+ }
77
78
+ return newMap
79
0 commit comments