mirror of
https://github.com/kataras/iris.git
synced 2025-01-24 03:01:03 +01:00
ed45c77be5
Former-commit-id: ed635ee95de7160cde11eaabc0c1dcb0e460a620
44 lines
677 B
Go
44 lines
677 B
Go
// Code generated by hero.
|
|
// DO NOT EDIT!
|
|
package template
|
|
|
|
import (
|
|
"io"
|
|
|
|
"github.com/shiyanhui/hero"
|
|
)
|
|
|
|
func UserListToWriter(userList []string, w io.Writer) (int, error) {
|
|
_buffer := hero.GetBuffer()
|
|
defer hero.PutBuffer(_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>
|
|
`)
|
|
return w.Write(_buffer.Bytes())
|
|
}
|