title: How to send variable and its value to html
body: <p>I have written a small piece of code in go </p>
  
  <pre><code>func loginHandler(w http.ResponseWriter, r *http.Request) {
      log.Println("loginHandler")
      log.Println("request url is", r.RequestURI)
      log.Println("request method", r.Method)
      requestbody, _ := ioutil.ReadAll(r.Body)
      log.Println("request body is", string(requestbody))
      if r.Method == "POST" {
          us, err := globalSessions.SessionStart(w, r)
          if err != nil {
              http.Error(w, err.Error(), http.StatusInternalServerError)
              return
          }
          us.Set("LoggedInUserID", "000000")
          w.Header().Set("Location", "/auth")
          w.WriteHeader(http.StatusFound)
          return
      }
      outputHTML(w, r, "static/login.html")
  }
  </code></pre>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>func outputHTML(w http.ResponseWriter, req *http.Request, filename string) {
   log.Println("outputHTML")
   requestbody, _ := ioutil.ReadAll(req.Body)
   log.Println("request body is", string(requestbody))
   log.Println("request body is", requestbody)
   file, err := os.Open(filename)
   if err != nil {
    http.Error(w, err.Error(), 500)
    return
   }
   defer file.Close()
   fi, _ := file.Stat()
   http.ServeContent(w, req, file.Name(), fi.ModTime(), file)
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>in this code i am redirecting to login.html . now i want to send a variable let it be some string called testvariable and its value to login.html. </p>