mirror of
https://github.com/kataras/iris.git
synced 2025-03-13 21:36:28 +01:00
Fixed context
Getting this bug # command-line-arguments ./main.go:22: undefined: iris.Context ./main.go:29: undefined: iris.Map Former-commit-id: b2db7da817e89d4c1d02f2f9b70f5fb3fb6ab34d
This commit is contained in:
parent
0a4e80c744
commit
055f3442d7
|
@ -19,14 +19,14 @@ func main() {
|
|||
// same as app.Handle("GET", "/ping", [...])
|
||||
// Method: GET
|
||||
// Resource: http://context:8080/ping
|
||||
app.Get("/ping", func(ctx iris.Context) {
|
||||
app.Get("/ping", func(ctx context.Context) {
|
||||
ctx.WriteString("pong")
|
||||
})
|
||||
|
||||
// Method: GET
|
||||
// Resource: http://localhost:8080/hello
|
||||
app.Get("/hello", func(ctx context.Context) {
|
||||
ctx.JSON(iris.Map{"message": "Hello iris web framework."})
|
||||
ctx.JSON(context.Map{"message": "Hello iris web framework."})
|
||||
})
|
||||
|
||||
// http://localhost:8080
|
||||
|
|
Loading…
Reference in New Issue
Block a user