Skip to content
hakk
  • Home
  • Blog
  • Docs
  • DSA
  • Snippets

Template

  • HTML templating in Go 2022-11-04

    Within the Go Standard library HTML package there’s a template package which enables generating HTML page from a rich templating engine with the output safe against code injection. This means there is no need to worry about XSS attacks as Go parses the HTML template and escapes all inputs before displaying it to the browser.

    Let’s take a look at a simple example. This example will use a couple of structs to store data about some people and then display that data in an HTML table.

Recent posts
  • How to Update a File's Creation Time in PowerShell
  • How to Run PowerShell Code Only During Certain Times
  • PeopleSoft App Server Freeze Troubleshooting Checklist
  • Build Vim With Python3 Support
  • Understanding the ss Command: A Modern Alternative to netstat
© 2026 hakk
  • Home
  • Blog
  • Docs
  • DSA
  • Snippets