Search code examples
templatesgomustache

Built-in "html/template" or "mustache", which one shall I use?


I'm new to golang, and want to use it to build a web app.

I found it has built-in html/template, which can render html template with specified data, and there is also a mustache port which seems good.

I'm not sure which one shall I use. Please give me some advices or comparations between them to let me decide, thank you.


Solution

  • I prefer use html/template because it comes in Go library, and by its simple design.

    You can see in the next web application how powerfull it is:

    https://bitbucket.org/jzs/sketchground/src