From 6805afaa61cd429f76f5529d12db47a62d189d9c Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Mon, 24 Oct 2016 00:48:15 +0900 Subject: [PATCH] Minor changes --- main.go | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/main.go b/main.go index 4b982377..1b50e613 100644 --- a/main.go +++ b/main.go @@ -8,15 +8,6 @@ import ( "github.com/blitzprog/arn" ) -const ( - gzipThreshold = 1450 - contentTypeHeader = "content-type" - contentType = "text/html;charset=utf-8" - contentEncodingHeader = "content-encoding" - contentEncoding = "gzip" - hello = "Hello World" -) - func main() { app := aero.New() @@ -26,11 +17,11 @@ func main() { ctx.RespondBytes(example) }) - template := aero.NewTemplate("pages/anime/anime.pug") + app.Get("/hello", func(ctx *aero.Context) { + ctx.Respond("Hello World") + }) - // app.Get("/hello", func(ctx *fasthttp.RequestCtx, _ fasthttprouter.Params) { - // aero.Respond(ctx, "Hello World") - // }) + template := aero.NewTemplate("pages/anime/anime.pug") app.Get("/anime/:id", func(ctx *aero.Context) { id, _ := strconv.Atoi(ctx.Params.ByName("id"))