Set map,struct to session in golang( gin gonic framework)
<p>I am using gin gonic to build a web application. I use <a href="https://github.com/gin-gonic/contrib/tree/master/sessions" rel="nofollow">https://github.com/gin-gonic/contrib/tree/master/sessions</a> to handle session. Forexample, i set a integer value to session: </p>

<pre><code>function Test(c *gin.Context){
  session:= sessions.Default(c)
  session.Set("mysession",123)
  session.Save()
}
</code></pre>

<p>And in another controllers, i can get this session by <code>session.Get("mysession")</code>.</p>

<p>But if i set map or struct. I only can get the session in the same controller. something wrong here??</p>