title: Golang gorilla sessions preserving form data after redirect
body: <p>From logic point of view I am trying to preserve partial form data between redirects for better user experience so user won't have to fill entire form again, just the part that was invalid.</p>
  
  <p>From programing point of view I am trying to save request.PostForm data structure in gorilla session's flashes. The only thing I manage to retrieve after redirect is string representation of memory address like this [0xc2001c8b10].</p>
  
  <p>Here is the part where I save flashes data after validation error (request.ParseForm() was executed before this):</p>
  
  <pre><code>session, _ := store.Get(request, "test")
  session.AddFlash(err.Error(), "messages")
  session.AddFlash(request.PostForm, "form_data")
  session.Save(request, response)
  http.Redirect(response, request, "/", http.StatusFound)
  return
  </code></pre>
  
  <p>Also I tried registering structure with gob without effect:</p>
  
  <pre><code>func init() {
      gob.Register(&amp;url.Values{})
  }
  </code></pre>
  
  <p>Form values are in lower case, eg. "first_name", "last_name" if that could have any influence on this behavior.</p>
  
  <p>Please keep in mind that I successfully manage to retrieve "messages" after redirect, only problem I have is with structural data.</p>
  
  <p>Am I doing something wrong or is there maybe another approach to fill partial forms after redirect that I am not aware of?</p>