Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
gingonicc.Html()のタイプの関数を介して関数を渡したいです。Context
c.Html()
Context
たとえば、変数を渡したい場合は、
c.HTML(http.StatusOK, "index", gin.H{ "user": user, "userID": userID, })
そしてhtmlでは、それを{{.user}}. しかし今、関数を使用して、html テンプレートでそれを渡し、呼び出すにはどうすればよいでしょうか?
{{.user}}