mirror of
https://github.com/kataras/iris.git
synced 2026-01-06 03:27:27 +00:00
formatting
Former-commit-id: 037081db5d6d4434e873ca8b75334ee43e046b6a
This commit is contained in:
@@ -14,14 +14,13 @@ import (
|
||||
// Read more at https://github.com/shiyanhui/hero/hero
|
||||
|
||||
func main() {
|
||||
|
||||
app := iris.New()
|
||||
|
||||
app.Get("/users", func(ctx iris.Context) {
|
||||
ctx.Gzip(true)
|
||||
ctx.ContentType("text/html")
|
||||
|
||||
var userList = []string{
|
||||
userList := []string{
|
||||
"Alice",
|
||||
"Bob",
|
||||
"Tom",
|
||||
|
||||
@@ -37,5 +37,4 @@ func UserList(userList []string, buffer *bytes.Buffer) {
|
||||
</body>
|
||||
</html>
|
||||
`)
|
||||
|
||||
}
|
||||
|
||||
@@ -40,5 +40,4 @@ func UserListToWriter(userList []string, w io.Writer) (int, error) {
|
||||
</html>
|
||||
`)
|
||||
return w.Write(_buffer.Bytes())
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user