iris/_examples/http_responsewriter/hero/template/userlist.html.go
Gerasimos (Makis) Maropoulos 22504f01ef add a simple hero template example as requested at https://github.com/kataras/iris/issues/840
Former-commit-id: 1c65190d21a5febbbbad1b2b565f82f749278d48
2017-12-14 06:11:37 +02:00

42 lines
569 B
Go

// Code generated by hero.
// DO NOT EDIT!
package template
import (
"bytes"
"github.com/shiyanhui/hero"
)
func UserList(userList []string, buffer *bytes.Buffer) {
buffer.WriteString(`<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
`)
for _, user := range userList {
buffer.WriteString(`
<ul>
`)
buffer.WriteString(`<li>
`)
hero.EscapeHTML(user, buffer)
buffer.WriteString(`
</li>
`)
buffer.WriteString(`
</ul>
`)
}
buffer.WriteString(`
</body>
</html>
`)
}