go-examples/tpl-text/tpl.html
2017-07-25 20:05:00 +02:00

19 lines
297 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<h1>{{ .MyTitle }}</h1>
<h2>{{ myFunc "hello" }}</h2>
<ul>
{{ range .Lst }}
<li>{{ . }}</li>
{{ else }}
<li>VIDE</li>
{{ end }}
</ul>
<p>{{ .Thing }}</p>
</body>
</html>