2. Handling HTTP Requests with Gin – HTML Templates
2.6 HTML Templates Go language uses the built-in <span>html/template</span> package to render HTML templates, providing safe template parsing and execution features to prevent cross-site scripting attacks (XSS). Templates can be created using <span>template.New()</span> and then read and parsed using <span>ParseFiles()</span>. Gin uses the <span>gin.Context</span> object’s <span>HTML()</span> method to combine HTML templates with data, rendering and … Read more