mirror of
https://github.com/gofiber/fiber.git
synced 2025-07-09 12:09:58 +00:00
Update README.md (#3165)
Missing a pointer reference when passing the context object in the route handler function. In Fiber, the context (c) is a pointer, so it should be *fiber.Ctx instead of fiber.Ctx.
This commit is contained in:
parent
48e82e753c
commit
9dd3d94ff2
2
.github/README.md
vendored
2
.github/README.md
vendored
@ -73,7 +73,7 @@ func main() {
|
|||||||
app := fiber.New()
|
app := fiber.New()
|
||||||
|
|
||||||
// Define a route for the GET method on the root path '/'
|
// Define a route for the GET method on the root path '/'
|
||||||
app.Get("/", func(c fiber.Ctx) error {
|
app.Get("/", func(c *fiber.Ctx) error {
|
||||||
// Send a string response to the client
|
// Send a string response to the client
|
||||||
return c.SendString("Hello, World 👋!")
|
return c.SendString("Hello, World 👋!")
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user