如何像在JavaScript中那样在Golang模板中打印对象

renderTemplate(w, "index", map[string]interface{}{
    "ActualQAll": req.URL.Query(),
})

and inside golanghtml

...{{.ActualQAll}}...

But it shows nothing.

how can I print the whole object out like if I could do in javascript by doing JSON.stringify(obj) an object?

Thanks

Use fmt.Sprintf function, maybe something like below:

renderTemplate(w, "index", fmt.Sprintf("%s", ActuallQAll))

I'm not sure what exactly the object looks like.