1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-04 10:47:20 +00:00

formatting

Former-commit-id: 037081db5d6d4434e873ca8b75334ee43e046b6a
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-08-17 10:06:20 +03:00
parent 00967408dc
commit 07046ab978
112 changed files with 477 additions and 517 deletions

View File

@@ -74,5 +74,4 @@ func TestContentNegotiation(t *testing.T) {
if expected, got := expectedHTMLResponse, string(rawResponse); expected != got {
t.Fatalf("expected response to be:\n%s but got:\n%s", expected, got)
}
}

View File

@@ -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",

View File

@@ -37,5 +37,4 @@ func UserList(userList []string, buffer *bytes.Buffer) {
</body>
</html>
`)
}

View File

@@ -40,5 +40,4 @@ func UserListToWriter(userList []string, w io.Writer) (int, error) {
</html>
`)
return w.Write(_buffer.Bytes())
}

View File

@@ -42,7 +42,6 @@ func main() {
s.Publish("messages", &sse.Event{
Data: []byte("third message"),
})
}() // ...
app.Run(iris.Addr(":8080"), iris.WithoutServerError(iris.ErrServerClosed))