Skip to content

Commit 23bd46c

Browse files
authored
Update iris code to the latest (v11)
1 parent 60909f6 commit 23bd46c

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)