You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 satır
492B

  1. package main
  2. import (
  3. "html/template"
  4. "io/ioutil"
  5. "log"
  6. "net/http"
  7. )
  8. func spaEditProfile(w http.ResponseWriter, r *http.Request) {
  9. tTest := template.New("spaEditProfile")
  10. str, err := ioutil.ReadFile("spa/edit.html")
  11. log.Println(string(str))
  12. log.Println(err)
  13. tTest, err = tTest.Parse(string(str))
  14. log.Println(err)
  15. id := "595a323d4d639d84d"
  16. lead, err := crmGetLead(id)
  17. log.Println(err)
  18. err = tTest.Execute(w, lead)
  19. log.Println(err)
  20. //http.ServeFile(w, r, "spa/edit.html")
  21. }