Skip to content

Commit 2bee276

Browse files
authored
Merge pull request networknt#45 from kataras/patch-1
Update iris code to the latest (v11)
2 parents 60909f6 + 23bd46c commit 2bee276

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

iris/server.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
package main
22

3-
import ("github.com/kataras/iris")
3+
import "github.com/kataras/iris"
44

55
func main() {
6-
iris.Config.Charset = "UTF-8" // this is the default, you don't have to set it manually
7-
8-
iris.Get("/", func(ctx *iris.Context) {
9-
ctx.Text(iris.StatusOK, "Hello World!")
6+
app := iris.New()
7+
app.Get("/", func(ctx iris.Context) {
8+
ctx.WriteString("Hello World!")
109
})
11-
iris.Listen(":8080")
10+
app.Run(iris.Addr(":8080"))
1211
}

0 commit comments

Comments
 (0)