Skip to content

Commit f1f369a

Browse files
1 parent 20ecb5e commit f1f369a

File tree

32 files changed

+78
-78
lines changed

32 files changed

+78
-78
lines changed

β€Ždocs/recipes/404-handler/README.mdβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ package main
4646

4747
import (
4848
"log"
49-
"github.com/gofiber/fiber/v2"
49+
"github.com/gofiber/fiber/v3"
5050
)
5151

5252
func main() {
@@ -57,7 +57,7 @@ func main() {
5757
app.Get("/hello", hello)
5858

5959
// 404 Handler
60-
app.Use(func(c *fiber.Ctx) error {
60+
app.Use(func(c fiber.Ctx) error {
6161
return c.SendStatus(fiber.StatusNotFound) // => 404 "Not Found"
6262
})
6363

@@ -66,7 +66,7 @@ func main() {
6666
}
6767

6868
// Handler
69-
func hello(c *fiber.Ctx) error {
69+
func hello(c fiber.Ctx) error {
7070
return c.SendString("I made a β˜• for you!")
7171
}
7272
```

β€Ždocs/recipes/air/README.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ package main
7171
7272
import (
7373
"log"
74-
"github.com/gofiber/fiber/v2"
74+
"github.com/gofiber/fiber/v3"
7575
)
7676
7777
func main() {
7878
// Create new Fiber instance
7979
app := fiber.New()
8080
8181
// Create new GET route on path "/"
82-
app.Get("/", func(c *fiber.Ctx) error {
82+
app.Get("/", func(c fiber.Ctx) error {
8383
return c.SendString("Hello, World!")
8484
})
8585

β€Ždocs/recipes/aws-eb/README.mdβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The build process is defined in the `Buildfile` and `build.sh` scripts.
5757
```bash
5858
#!/bin/bash -xe
5959
# Get dependencies
60-
go get -u github.com/gofiber/fiber/v2
60+
go get -u github.com/gofiber/fiber/v3
6161
6262
# Build the binary
6363
go build -o application application.go
@@ -76,15 +76,15 @@ import (
7676
"log"
7777
"os"
7878
79-
"github.com/gofiber/fiber/v2"
79+
"github.com/gofiber/fiber/v3"
8080
)
8181
8282
func main() {
8383
// Initialize the application
8484
app := fiber.New()
8585
8686
// Hello, World!
87-
app.Get("/", func(c *fiber.Ctx) error {
87+
app.Get("/", func(c fiber.Ctx) error {
8888
return c.SendString("Hello, World!")
8989
})
9090

β€Ždocs/recipes/clean-architecture/README.mdβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@ import (
151151
"clean-architecture/pkg/book"
152152
"clean-architecture/pkg/entities"
153153
"clean-architecture/api/presenter"
154-
"github.com/gofiber/fiber/v2"
154+
"github.com/gofiber/fiber/v3"
155155
"net/http"
156156
"errors"
157157
)
158158
159159
func AddBook(service book.Service) fiber.Handler {
160-
return func(c *fiber.Ctx) error {
160+
return func(c fiber.Ctx) error {
161161
var requestBody entities.Book
162162
err := c.BodyParser(&requestBody)
163163
if err != nil {
@@ -185,7 +185,7 @@ package main
185185
import (
186186
"clean-architecture/api/routes"
187187
"clean-architecture/pkg/book"
188-
"github.com/gofiber/fiber/v2"
188+
"github.com/gofiber/fiber/v3"
189189
)
190190
191191
func main() {

β€Ždocs/recipes/email-verification/README.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,5 @@ go run main.go
9595

9696
## Dependencies
9797

98-
- [Fiber v2](https://github.com/gofiber/fiber)
98+
- [Fiber v3](https://github.com/gofiber/fiber)
9999
- Go 1.25+

β€Ždocs/recipes/file-server/README.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ package main
4848
4949
import (
5050
"log"
51-
"github.com/gofiber/fiber/v2"
51+
"github.com/gofiber/fiber/v3"
5252
)
5353
5454
func main() {

β€Ždocs/recipes/firebase-functions/README.mdβ€Ž

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ package src
3434
import (
3535
"example.com/GofiberFirebaseBoilerplate/src/routes"
3636

37-
"github.com/gofiber/fiber/v2"
37+
"github.com/gofiber/fiber/v3"
3838
)
3939

4040
func CreateServer() *fiber.App {
@@ -45,7 +45,7 @@ func CreateServer() *fiber.App {
4545
AppName: "Gofiber Firebase Boilerplate " + version,
4646
})
4747

48-
app.Get("/", func(c *fiber.Ctx) error {
48+
app.Get("/", func(c fiber.Ctx) error {
4949
return c.SendString("Gofiber Firebase Boilerplate " + version)
5050
})
5151

@@ -66,7 +66,7 @@ import (
6666
"example.com/GofiberFirebaseBoilerplate/src/database"
6767
"example.com/GofiberFirebaseBoilerplate/src/repositories"
6868

69-
"github.com/gofiber/fiber/v2"
69+
"github.com/gofiber/fiber/v3"
7070
)
7171

7272
type Routes struct {
@@ -82,7 +82,7 @@ func (r *Routes) Setup(app *fiber.App) {
8282
app.Post("message", r.insertMessage)
8383
}
8484

85-
func (r *Routes) insertMessage(c *fiber.Ctx) error {
85+
func (r *Routes) insertMessage(c fiber.Ctx) error {
8686
return c.SendString("ok")
8787
}
8888
```
@@ -207,8 +207,8 @@ package app
207207
import (
208208
"net/http"
209209

210-
"github.com/gofiber/fiber/v2"
211-
adaptor "github.com/gofiber/fiber/v2/middleware/adaptor"
210+
"github.com/gofiber/fiber/v3"
211+
adaptor "github.com/gofiber/fiber/v3/middleware/adaptor"
212212
)
213213

214214
// CloudFunctionRouteToFiber route cloud function http.Handler to *fiber.App
@@ -232,7 +232,7 @@ import (
232232
"strings"
233233

234234
"example.com/GofiberFirebaseBoilerplate/src"
235-
"github.com/gofiber/fiber/v2"
235+
"github.com/gofiber/fiber/v3"
236236
)
237237

238238
var app *fiber.App

β€Ždocs/recipes/geoip/README.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ package main
5252
5353
import (
5454
"log"
55-
"github.com/gofiber/fiber/v2"
55+
"github.com/gofiber/fiber/v3"
5656
"github.com/oschwald/geoip2-golang"
5757
"net"
5858
)
@@ -66,7 +66,7 @@ func main() {
6666
}
6767
defer db.Close()
6868
69-
app.Get("/geoip/:ip", func(c *fiber.Ctx) error {
69+
app.Get("/geoip/:ip", func(c fiber.Ctx) error {
7070
ip := c.Params("ip")
7171
parsedIP := net.ParseIP(ip)
7272
record, err := db.City(parsedIP)

β€Ždocs/recipes/gorm-postgres/README.mdβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ package main
5757
5858
import (
5959
"log"
60-
"github.com/gofiber/fiber/v2"
60+
"github.com/gofiber/fiber/v3"
6161
"gorm.io/driver/postgres"
6262
"gorm.io/gorm"
6363
)
@@ -79,11 +79,11 @@ func main() {
7979
8080
app := fiber.New()
8181
82-
app.Get("/", func(c *fiber.Ctx) error {
82+
app.Get("/", func(c fiber.Ctx) error {
8383
return c.SendString("Hello, GORM with PostgreSQL!")
8484
})
8585
86-
app.Post("/users", func(c *fiber.Ctx) error {
86+
app.Post("/users", func(c fiber.Ctx) error {
8787
user := new(User)
8888
if err := c.BodyParser(user); err != nil {
8989
return c.Status(fiber.StatusBadRequest).SendString(err.Error())

β€Ždocs/recipes/graceful-shutdown/README.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fiberRecipes/graceful-shutdown on graceful-shutdown (f0834df) [?] via 🐹 v1.15
1313
❯ go run graceful-shutdown
1414
1515
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
16-
β”‚ Fiber v2.1.0 β”‚
16+
β”‚ Fiber v3.0.0 β”‚
1717
β”‚ http://127.0.0.1:3000 β”‚
1818
β”‚ β”‚
1919
β”‚ Handlers ............. 2 Threads ............. 8 β”‚

0 commit comments

Comments
Β (0)