I can't include templates in html. A strange thing happens for me: 
when viewing in devtools, I see that everything is parsed first except the 
template,
and then the template itself. Although it is included in the tag in the 
middle of the file. Most likely, this is due to the fact that I wrote this 
in go:

tmp := template.Must(template.ParseFiles(files...))
stone Shop := stones()
err = temp.Execute(w, block)
if err != nil {
log.Fatal(error)
}
err = temp.ExecuteTemplate(w, "stone", stoneShop)
if err != nil {
log.Print(err)
}

I need to transfer different data (block, stoneShop) to one page, and 
stoneShop is used in the template. Perhaps because of the double Execute 
call, such an oddity occurs. How can this be implemented at all, if not so? 
If you need more information, then my git: 
https://github.com/MukhortovDenis/goproject/tree/liltest , where are the 
functions in handlers.go

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/20c0b101-26af-4858-bc94-6b713919a1b8n%40googlegroups.com.

Reply via email to