-
-
Notifications
You must be signed in to change notification settings - Fork 490
test_v3_migration2 #3314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
test_v3_migration2 #3314
Conversation
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 43 files out of 150 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Note The number of changes in this pull request is too large for Gemini Code Assist to generate a summary. |
its a test for the mirgrator cli |
==== ./auth-jwt ====
# api-fiber-gorm/middleware
---- source: ./auth-jwt/middleware/auth.go:12 ----
11 func Protected() fiber.Handler {
12 return jwtware.New(jwtware.Config{
13 SigningKey: jwtware.SigningKey{Key: []byte(config.Config("SECRET"))},
Error: middleware/auth.go:12:9: cannot use jwtware.New(jwtware.Config{…}) (value of func type "github.com/gofiber/fiber/v2".Handler) as "github.com/gofiber/fiber/v3".Handler value in return statement
---- source: ./auth-jwt/middleware/auth.go:14 ----
13 SigningKey: jwtware.SigningKey{Key: []byte(config.Config("SECRET"))},
14 ErrorHandler: jwtError,
15 })
Error: middleware/auth.go:14:17: cannot use jwtError (value of type func(c "github.com/gofiber/fiber/v3".Ctx, err error) error) as "github.com/gofiber/fiber/v2".ErrorHandler value in struct literal
==== ./auth-docker-postgres-jwt ====
# app/middleware
---- source: ./auth-docker-postgres-jwt/middleware/auth.go:12 ----
11 func Protected() fiber.Handler {
12 return jwtware.New(jwtware.Config{
13 SigningKey: jwtware.SigningKey{Key: []byte(config.Config("SECRET"))},
Error: middleware/auth.go:12:9: cannot use jwtware.New(jwtware.Config{…}) (value of func type "github.com/gofiber/fiber/v2".Handler) as "github.com/gofiber/fiber/v3".Handler value in return statement
---- source: ./auth-docker-postgres-jwt/middleware/auth.go:14 ----
13 SigningKey: jwtware.SigningKey{Key: []byte(config.Config("SECRET"))},
14 ErrorHandler: jwtError,
15 })
Error: middleware/auth.go:14:17: cannot use jwtError (value of type func(c "github.com/gofiber/fiber/v3".Ctx, err error) error) as "github.com/gofiber/fiber/v2".ErrorHandler value in struct literal
==== ./csrf ====
# main/routes
---- source: ./csrf/routes/mainServer.go:36 ----
35 func init() {
36 sessionStore.RegisterType(fiber.Map{})
37 // this mean, csrf is activated
Error: routes/mainServer.go:36:15: sessionStore.RegisterType undefined (type fiber.Handler has no field or method RegisterType)
---- source: ./csrf/routes/mainServer.go:51 ----
50 CookieSameSite: "Strict",
51 Expiration: 1 * time.Hour,
52 KeyGenerator: utils.UUID,
Error: routes/mainServer.go:51:2: unknown field Expiration in struct literal of type csrf.Config
---- source: ./csrf/routes/mainServer.go:53 ----
52 KeyGenerator: utils.UUID,
53 ContextKey: "token",
54 })
Error: routes/mainServer.go:53:2: unknown field ContextKey in struct literal of type csrf.Config
---- source: ./csrf/routes/mainServer.go:74 ----
73 app.Get("/", requireLogin, csrfProtection, func(c fiber.Ctx) error {
74 currSession, err := sessionStore.Get(c)
75 if err != nil {
Error: routes/mainServer.go:74:36: sessionStore.Get undefined (type fiber.Handler has no field or method Get)
---- source: ./csrf/routes/mainServer.go:93 ----
92 "balance": accounts[username],
93 "csrfToken": keyauth.TokenFromContext(c),
94 })
Error: routes/mainServer.go:93:17: undefined: keyauth
---- source: ./csrf/routes/mainServer.go:122 ----
121 // Create a new currSession and save their user data in the currSession.
122 currSession, err := sessionStore.Get(c)
123 defer currSession.Save()
Error: routes/mainServer.go:122:36: sessionStore.Get undefined (type fiber.Handler has no field or method Get)
---- source: ./csrf/routes/mainServer.go:148 ----
147 }
148 currSession, err := sessionStore.Get(c)
149 if err != nil {
Error: routes/mainServer.go:148:36: sessionStore.Get undefined (type fiber.Handler has no field or method Get)
---- source: ./csrf/routes/mainServer.go:190 ----
189 func requireLogin(c fiber.Ctx) error {
190 currSession, err := sessionStore.Get(c)
191 if err != nil {
Error: routes/mainServer.go:190:35: sessionStore.Get undefined (type fiber.Handler has no field or method Get)
==== ./csrf-with-session ====
# main
---- source: ./csrf-with-session/./main.go:124 ----
123 csrfConfig := csrf.Config{
124 Session: store,
125 Extractor: csrf.FromForm("csrf"), // In this example, we will be using a hidden input field to store the CSRF token
Error: ./main.go:124:19: cannot use store (variable of func type fiber.Handler) as *session.Store value in struct literal
---- source: ./csrf-with-session/./main.go:130 ----
129 CookieHTTPOnly: true, // Recommended, otherwise if using JS framework recomend: false and Extractor: csrf.FromHeader("X-CSRF-Token")
130 ContextKey: "csrf",
131 ErrorHandler: csrfErrorHandler,
Error: ./main.go:130:3: unknown field ContextKey in struct literal of type csrf.Config
---- source: ./csrf-with-session/./main.go:146 ----
145 app.Get("/login", csrfMiddleware, func(c fiber.Ctx) error {
146 csrfToken, ok := csrf.TokenFromContext(c).(string)
147 if !ok {
Error: ./main.go:146:20: invalid operation: csrf.TokenFromContext(c) (value of type string) is not an interface
---- source: ./csrf-with-session/./main.go:174 ----
173 // Authentication failed
174 csrfToken, ok := csrf.TokenFromContext(c).(string)
175 if !ok {
Error: ./main.go:174:21: invalid operation: csrf.TokenFromContext(c) (value of type string) is not an interface
---- source: ./csrf-with-session/./main.go:187 ----
186 // Set a session variable to mark the user as logged in
187 session, err := store.Get(c)
188 if err != nil {
Error: ./main.go:187:25: store.Get undefined (type fiber.Handler has no field or method Get)
---- source: ./csrf-with-session/./main.go:206 ----
205 // Retrieve the session
206 session, err := store.Get(c)
207 if err != nil {
Error: ./main.go:206:25: store.Get undefined (type fiber.Handler has no field or method Get)
---- source: ./csrf-with-session/./main.go:223 ----
222 // Check if the user is logged in
223 session, err := store.Get(c)
224 if err != nil {
Error: ./main.go:223:25: store.Get undefined (type fiber.Handler has no field or method Get)
---- source: ./csrf-with-session/./main.go:234 ----
233
234 csrfToken, ok := csrf.TokenFromContext(c).(string)
235 if !ok {
Error: ./main.go:234:20: invalid operation: csrf.TokenFromContext(c) (value of type string) is not an interface
---- source: ./csrf-with-session/./main.go:248 ----
247 // Check if the user is logged in
248 session, err := store.Get(c)
249 if err != nil {
Error: ./main.go:248:25: store.Get undefined (type fiber.Handler has no field or method Get)
---- source: ./csrf-with-session/./main.go:259 ----
258
259 csrfToken, ok := csrf.TokenFromContext(c).(string)
260 if !ok {
Error: ./main.go:259:20: invalid operation: csrf.TokenFromContext(c) (value of type string) is not an interface
---- source: ./csrf-with-session/./main.go:259 ----
258
259 csrfToken, ok := csrf.TokenFromContext(c).(string)
260 if !ok {
Error: ./main.go:259:20: too many errors
==== ./docker-mariadb-clean-arch ====
# docker-mariadb-clean-arch/internal/auth
---- source: ./docker-mariadb-clean-arch/internal/auth/middleware.go:29 ----
28 func JWTMiddleware() fiber.Handler {
29 return jwtware.New(jwtware.Config{
30 ErrorHandler: jwtError,
Error: internal/auth/middleware.go:29:9: cannot use jwtware.New(jwtware.Config{…}) (value of func type "github.com/gofiber/fiber/v2".Handler) as "github.com/gofiber/fiber/v3".Handler value in return statement
---- source: ./docker-mariadb-clean-arch/internal/auth/middleware.go:30 ----
29 return jwtware.New(jwtware.Config{
30 ErrorHandler: jwtError,
31 SigningKey: jwtware.SigningKey{Key: []byte(os.Getenv("JWT_SECRET"))},
Error: internal/auth/middleware.go:30:17: cannot use jwtError (value of type func(c "github.com/gofiber/fiber/v3".Ctx, err error) error) as "github.com/gofiber/fiber/v2".ErrorHandler value in struct literal
# docker-mariadb-clean-arch/internal/user
---- source: ./docker-mariadb-clean-arch/internal/user/handler.go:60 ----
59 // Fetch parameter.
60 targetedUserID, err := fiber.Params[int](c, "userID")
61 if err != nil {
Error: internal/user/handler.go:60:25: assignment mismatch: 2 variables but fiber.Params[int] returns 1 value
---- source: ./docker-mariadb-clean-arch/internal/user/middleware.go:16 ----
15 // Fetch parameter.
16 targetedUserID, err := fiber.Params[int](c, "userID")
17 if err != nil {
Error: internal/user/middleware.go:16:25: assignment mismatch: 2 variables but fiber.Params[int] returns 1 value
==== ./ent-mysql ====
# ent-mysql/routes
---- source: ./ent-mysql/routes/routes.go:14 ----
13 func GetBook(c fiber.Ctx) error {
14 id, _ := fiber.Params[int](c, "id")
15 b, err := database.DBConn.Book.
Error: routes/routes.go:14:11: assignment mismatch: 2 variables but fiber.Params[int] returns 1 value
---- source: ./ent-mysql/routes/routes.go:56 ----
55 func DeleteBook(c fiber.Ctx) error {
56 id, _ := fiber.Params[int](c, "id")
57 err := database.DBConn.Book.
Error: routes/routes.go:56:11: assignment mismatch: 2 variables but fiber.Params[int] returns 1 value
---- source: ./ent-mysql/routes/routes.go:70 ----
69 author := c.Query("author")
70 id, _ := fiber.Params[int](c, "id")
71 if title == "" || author == "" {
Error: routes/routes.go:70:11: assignment mismatch: 2 variables but fiber.Params[int] returns 1 value
==== ./entgo-sveltekit ====
# app
---- source: ./entgo-sveltekit/./main.go:64 ----
63 app.All("/*", static.New("", static.Config{
64 FS: os.DirFS(template.Dist()),
65 NotFoundFile: "index.html",
Error: ./main.go:64:17: undefined: os
---- source: ./entgo-sveltekit/./main.go:65 ----
64 FS: os.DirFS(template.Dist()),
65 NotFoundFile: "index.html",
66 IndexNames: []string{"index.html"},
Error: ./main.go:65:3: unknown field NotFoundFile in struct literal of type static.Config
==== ./file-server ====
# main
---- source: ./file-server/./main.go:18 ----
17 // Static file server
18 app.Get("/*", static.New("./files"))
19 // => http://localhost:3000/hello.txt
Error: ./main.go:18:16: undefined: static
==== ./geoip ====
# geoip
---- source: ./geoip/./main.go:28 ----
27 // Serve static assets
28 app.Get("/*", static.New("./public", fiber.static.Config{
29 Compress: true,
Error: ./main.go:28:16: undefined: static
---- source: ./geoip/./main.go:28 ----
27 // Serve static assets
28 app.Get("/*", static.New("./public", fiber.static.Config{
29 Compress: true,
Error: ./main.go:28:45: undefined: fiber.static
==== ./grpc ====
# github.com/gofiber/recipes/fiber-grpc/proto
---- source: ./grpc/proto/service.pb.go:302 ----
301 if interceptor == nil {
302 return srv.(AddServiceServer).Add([]string{ctx}, in)
303 }
Error: proto/service.pb.go:302:37: cannot use []string{…} (value of type []string) as context.Context value in argument to srv.(AddServiceServer).Add: []string does not implement context.Context (missing method Deadline)
---- source: ./grpc/proto/service.pb.go:302 ----
301 if interceptor == nil {
302 return srv.(AddServiceServer).Add([]string{ctx}, in)
303 }
Error: proto/service.pb.go:302:46: cannot use ctx (variable of interface type context.Context) as string value in array or slice literal
---- source: ./grpc/proto/service.pb.go:309 ----
308 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
309 return srv.(AddServiceServer).Add([]string{ctx}, req.(*Request))
310 }
Error: proto/service.pb.go:309:37: cannot use []string{…} (value of type []string) as context.Context value in argument to srv.(AddServiceServer).Add: []string does not implement context.Context (missing method Deadline)
---- source: ./grpc/proto/service.pb.go:309 ----
308 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
309 return srv.(AddServiceServer).Add([]string{ctx}, req.(*Request))
310 }
Error: proto/service.pb.go:309:46: cannot use ctx (variable of interface type context.Context) as string value in array or slice literal
==== ./gorm-postgres ====
# gorm-postgres
---- source: ./gorm-postgres/./app.go:13 ----
12 func setUpRoutes(app *fiber.App) {
13 app.Get("/hello", routes.Hello)
14 app.Get("/allbooks", routes.AllBooks)
Error: ./app.go:13:20: cannot use routes.Hello (value of type func(c *"github.com/gofiber/fiber/v2".Ctx) error) as "github.com/gofiber/fiber/v3".Handler value in argument to app.Get
---- source: ./gorm-postgres/./app.go:14 ----
13 app.Get("/hello", routes.Hello)
14 app.Get("/allbooks", routes.AllBooks)
15 app.Post("/addbook", routes.AddBook)
Error: ./app.go:14:23: cannot use routes.AllBooks (value of type func(c *"github.com/gofiber/fiber/v2".Ctx) error) as "github.com/gofiber/fiber/v3".Handler value in argument to app.Get
---- source: ./gorm-postgres/./app.go:15 ----
14 app.Get("/allbooks", routes.AllBooks)
15 app.Post("/addbook", routes.AddBook)
16 app.Post("/book", routes.Book)
Error: ./app.go:15:23: cannot use routes.AddBook (value of type func(c *"github.com/gofiber/fiber/v2".Ctx) error) as "github.com/gofiber/fiber/v3".Handler value in argument to app.Post
---- source: ./gorm-postgres/./app.go:16 ----
15 app.Post("/addbook", routes.AddBook)
16 app.Post("/book", routes.Book)
17 app.Put("/update", routes.Update)
Error: ./app.go:16:20: cannot use routes.Book (value of type func(c *"github.com/gofiber/fiber/v2".Ctx) error) as "github.com/gofiber/fiber/v3".Handler value in argument to app.Post
---- source: ./gorm-postgres/./app.go:17 ----
16 app.Post("/book", routes.Book)
17 app.Put("/update", routes.Update)
18 app.Delete("/delete", routes.Delete)
Error: ./app.go:17:21: cannot use routes.Update (value of type func(c *"github.com/gofiber/fiber/v2".Ctx) error) as "github.com/gofiber/fiber/v3".Handler value in argument to app.Put
---- source: ./gorm-postgres/./app.go:18 ----
17 app.Put("/update", routes.Update)
18 app.Delete("/delete", routes.Delete)
19 }
Error: ./app.go:18:24: cannot use routes.Delete (value of type func(c *"github.com/gofiber/fiber/v2".Ctx) error) as "github.com/gofiber/fiber/v3".Handler value in argument to app.Delete
==== ./jwt ====
# api-fiber-gorm/middleware
---- source: ./jwt/middleware/auth.go:10 ----
9 func Protected() func(fiber.Ctx) error {
10 return jwtware.New(jwtware.Config{
11 SigningKey: jwtware.SigningKey{Key: []byte("secret")},
Error: middleware/auth.go:10:9: cannot use jwtware.New(jwtware.Config{…}) (value of func type "github.com/gofiber/fiber/v2".Handler) as func("github.com/gofiber/fiber/v3".Ctx) error value in return statement
---- source: ./jwt/middleware/auth.go:12 ----
11 SigningKey: jwtware.SigningKey{Key: []byte("secret")},
12 ErrorHandler: jwtError,
13 })
Error: middleware/auth.go:12:17: cannot use jwtError (value of type func(c "github.com/gofiber/fiber/v3".Ctx, err error) error) as "github.com/gofiber/fiber/v2".ErrorHandler value in struct literal
==== ./openapi ====
# openapi/routes
---- source: ./openapi/routes/routes.go:23 ----
22
23 api := humafiber.New(app, huma.DefaultConfig("Book API", "1.0.0"))
24 group := huma.NewGroup(api, "/v1")
Error: routes/routes.go:23:23: cannot use app (variable of type *"github.com/gofiber/fiber/v3".App) as *"github.com/gofiber/fiber/v2".App value in argument to humafiber.New
==== ./monitoring-with-apitally ====
# main
---- source: ./monitoring-with-apitally/./main.go:48 ----
47 }
48 apitally.SetConsumer(c, consumer)
49 return true, nil
Error: ./main.go:48:25: cannot use c (variable of interface type "github.com/gofiber/fiber/v3".Ctx) as *"github.com/gofiber/fiber/v2".Ctx value in argument to apitally.SetConsumer
---- source: ./monitoring-with-apitally/./main.go:68 ----
67
68 app.Use(apitally.Middleware(app, cfg))
69
Error: ./main.go:68:30: cannot use app (variable of type *"github.com/gofiber/fiber/v3".App) as *"github.com/gofiber/fiber/v2".App value in argument to apitally.Middleware
---- source: ./monitoring-with-apitally/./main.go:72 ----
71 app.Use(keyauth.New(keyauth.Config{
72 Extractor: csrf.FromHeader("Authorization"),
73 Validator: validateAPIKey,
Error: ./main.go:72:3: unknown field Extractor in struct literal of type keyauth.Config
---- source: ./monitoring-with-apitally/./main.go:72 ----
71 app.Use(keyauth.New(keyauth.Config{
72 Extractor: csrf.FromHeader("Authorization"),
73 Validator: validateAPIKey,
Error: ./main.go:72:14: undefined: csrf
---- source: ./monitoring-with-apitally/./main.go:93 ----
92 // Capture validation errors in Apitally
93 apitally.CaptureValidationError(c, err)
94 return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{"error": err.Error()})
Error: ./main.go:93:36: cannot use c (variable of interface type "github.com/gofiber/fiber/v3".Ctx) as *"github.com/gofiber/fiber/v2".Ctx value in argument to apitally.CaptureValidationError
==== ./oauth2 ====
# oauth2/handlers
---- source: ./oauth2/handlers/handlers.go:26 ----
25 if err != nil {
26 return c.Redirect().To("/errpage.html", fiber.StatusInternalServerError)
27 }
Error: handlers/handlers.go:26:44: too many arguments in call to c.Redirect().To
have (string, number)
want (string)
# oauth2/middleware
---- source: ./oauth2/middleware/auth.go:25 ----
24
25 a := fiber.AcquireAgent()
26 req := a.Request()
Error: middleware/auth.go:25:13: undefined: fiber.AcquireAgent
---- source: ./oauth2/middleware/auth.go:65 ----
64 // return ctx.Redirect().To("/welcome.html?access_token="+t.AccessToken, fiber.StatusFound)
65 return ctx.Redirect().To("/welcome.html", fiber.StatusFound)
66 }
Error: middleware/auth.go:65:45: too many arguments in call to ctx.Redirect().To
have (string, number)
want (string)
---- source: ./oauth2/middleware/auth.go:69 ----
68 models.SYSLOG.Tracef("redirecting to /")
69 return ctx.Redirect().To("/", fiber.StatusTemporaryRedirect)
70 }
Error: middleware/auth.go:69:32: too many arguments in call to ctx.Redirect().To
have (string, number)
want (string)
---- source: ./oauth2/middleware/auth.go:100 ----
99 models.SYSLOG.Tracef("token is NULL")
100 return c.Redirect().To("/index.html", fiber.StatusTemporaryRedirect)
101 }
Error: middleware/auth.go:100:41: too many arguments in call to c.Redirect().To
have (string, number)
want (string)
---- source: ./oauth2/middleware/auth.go:139 ----
138
139 return c.Redirect().To("/index.html", fiber.StatusTemporaryRedirect)
140 }
Error: middleware/auth.go:139:40: too many arguments in call to c.Redirect().To
have (string, number)
want (string)
==== ./prefork ====
# main
---- source: ./prefork/./main.go:25 ----
24 app := fiber.New(fiber.Config{
25 EnablePrefork: true,
26 })
Error: ./main.go:25:3: unknown field EnablePrefork in struct literal of type fiber.Config
==== ./sse ====
# main
---- source: ./sse/./main.go:85 ----
84
85 c.Status(fiber.StatusOK).SetBodyStreamWriter(fasthttp.StreamWriter(func(w *bufio.Writer) {
86 fmt.Println("WRITER")
Error: ./main.go:85:28: c.Status(fiber.StatusOK).SetBodyStreamWriter undefined (type fiber.Ctx has no field or method SetBodyStreamWriter)
==== ./socketio ====
# main
---- source: ./socketio/./main.go:37 ----
36 // requested upgrade to the WebSocket protocol.
37 if websocket.IsWebSocketUpgrade(c) {
38 c.Locals("allowed", true)
Error: ./main.go:37:35: cannot use c (variable of interface type "github.com/gofiber/fiber/v3".Ctx) as *"github.com/gofiber/fiber/v2".Ctx value in argument to websocket.IsWebSocketUpgrade
---- source: ./socketio/./main.go:97 ----
96
97 app.Get("/ws/:id", socketio.New(func(kws *socketio.Websocket) {
98 // Retrieve the user id from endpoint
Error: ./main.go:97:21: cannot use socketio.New(func(kws *socketio.Websocket) {…}) (value of type func(*"github.com/gofiber/fiber/v2".Ctx) error) as "github.com/gofiber/fiber/v3".Handler value in argument to app.Get
==== ./svelte-netlify ====
# github.com/amalshaji/fiber-netlify/cmd/gateway
---- source: ./svelte-netlify/cmd/gateway/main.go:18 ----
17 app := fiber.New()
18 app.Get("/*", static.New("./public"))
19 app.Get("/", func(c fiber.Ctx) error {
Error: cmd/gateway/main.go:18:16: undefined: static
==== ./sessions-sqlite3 ====
# main
---- source: ./sessions-sqlite3/./main.go:65 ----
64 store := session.New(session.Config{
65 Storage: storage,
66 IdleTimeout: 5 * time.Minute})
Error: ./main.go:65:16: cannot use storage (variable of type *"github.com/gofiber/storage/sqlite3".Storage) as fiber.Storage value in struct literal: *"github.com/gofiber/storage/sqlite3".Storage does not implement fiber.Storage (missing method DeleteWithContext)
---- source: ./sessions-sqlite3/./main.go:94 ----
93 // Get or create session
94 s, _ := store.Get(c)
95
Error: ./main.go:94:17: store.Get undefined (type fiber.Handler has no field or method Get)
---- source: ./sessions-sqlite3/./main.go:141 ----
140 // Get current session
141 s, _ := store.Get(c)
142
Error: ./main.go:141:17: store.Get undefined (type fiber.Handler has no field or method Get)
---- source: ./sessions-sqlite3/./main.go:146 ----
145 // Get requested session
146 data, err := store.Storage.Get(req.SID)
147 if err != nil {
Error: ./main.go:146:23: store.Storage undefined (type fiber.Handler has no field or method Storage)
---- source: ./sessions-sqlite3/./main.go:160 ----
159 if s.Get("uid").(string) == dm["uid"] {
160 store.Storage.Delete(req.SID)
161 }
Error: ./main.go:160:11: store.Storage undefined (type fiber.Handler has no field or method Storage)
---- source: ./sessions-sqlite3/./main.go:173 ----
172 // Get current session
173 s, _ := store.Get(c)
174
Error: ./main.go:173:17: store.Get undefined (type fiber.Handler has no field or method Get)
==== ./sqlboiler ====
# fiber-sqlboiler/models
---- source: ./sqlboiler/models/author.go:188 ----
187
188 err := q.ViewBind(ctx, exec, o)
189 if err != nil {
Error: models/author.go:188:11: q.ViewBind undefined (type authorQuery has no field or method ViewBind)
---- source: ./sqlboiler/models/author.go:203 ----
202
203 err := q.ViewBind(ctx, exec, &o)
204 if err != nil {
Error: models/author.go:203:11: q.ViewBind undefined (type authorQuery has no field or method ViewBind)
---- source: ./sqlboiler/models/author.go:325 ----
324 var resultSlice []*Post
325 if err = queries.ViewBind(results, &resultSlice); err != nil {
326 return errors.Wrap(err, "failed to bind eager loaded slice post")
Error: models/author.go:325:19: undefined: queries.ViewBind
---- source: ./sqlboiler/models/author.go:442 ----
441
442 err := q.ViewBind(ctx, exec, authorObj)
443 if err != nil {
Error: models/author.go:442:11: q.ViewBind undefined (type *queries.Query has no field or method ViewBind)
---- source: ./sqlboiler/models/author.go:878 ----
877
878 err := q.ViewBind(ctx, exec, &slice)
879 if err != nil {
Error: models/author.go:878:11: q.ViewBind undefined (type *queries.Query has no field or method ViewBind)
---- source: ./sqlboiler/models/post.go:234 ----
233
234 err := q.ViewBind(ctx, exec, o)
235 if err != nil {
Error: models/post.go:234:11: q.ViewBind undefined (type postQuery has no field or method ViewBind)
---- source: ./sqlboiler/models/post.go:249 ----
248
249 err := q.ViewBind(ctx, exec, &o)
250 if err != nil {
Error: models/post.go:249:11: q.ViewBind undefined (type postQuery has no field or method ViewBind)
---- source: ./sqlboiler/models/post.go:370 ----
369 var resultSlice []*Author
370 if err = queries.ViewBind(results, &resultSlice); err != nil {
371 return errors.Wrap(err, "failed to bind eager loaded slice Author")
Error: models/post.go:370:19: undefined: queries.ViewBind
---- source: ./sqlboiler/models/post.go:484 ----
483
484 err := q.ViewBind(ctx, exec, postObj)
485 if err != nil {
Error: models/post.go:484:11: q.ViewBind undefined (type *queries.Query has no field or method ViewBind)
---- source: ./sqlboiler/models/post.go:944 ----
943
944 err := q.ViewBind(ctx, exec, &slice)
945 if err != nil {
Error: models/post.go:944:11: q.ViewBind undefined (type *queries.Query has no field or method ViewBind)
---- source: ./sqlboiler/models/post.go:944 ----
943
944 err := q.ViewBind(ctx, exec, &slice)
945 if err != nil {
Error: models/post.go:944:11: too many errors
==== ./react-router ====
# react-router/cmd/react-router
---- source: ./react-router/cmd/react-router/main.go:18 ----
17
18 app.Get("/*", static.New("./web/build"))
19
Error: cmd/react-router/main.go:18:16: undefined: static
---- source: ./react-router/cmd/react-router/main.go:24 ----
23
24 app.Get("*", static.New("./web/build/index.html"))
25
Error: cmd/react-router/main.go:24:15: undefined: static
==== ./spa ====
# main
---- source: ./spa/./main.go:19 ----
18 // assume static file at dist folder
19 app.Get("/web*", static.New("dist"))
20
Error: ./main.go:19:19: undefined: static
==== ./sveltekit-embed ====
# app
---- source: ./sveltekit-embed/./main.go:35 ----
34 app.All("/*", static.New("", static.Config{
35 FS: os.DirFS(template.Dist()),
36 NotFoundFile: "index.html",
Error: ./main.go:35:17: undefined: os
---- source: ./sveltekit-embed/./main.go:36 ----
35 FS: os.DirFS(template.Dist()),
36 NotFoundFile: "index.html",
37 IndexNames: []string{"index.html"},
Error: ./main.go:36:3: unknown field NotFoundFile in struct literal of type static.Config
==== ./template-asset-bundling ====
# github.com/gofiber/recipes/template-asset-bundling
---- source: ./template-asset-bundling/./app.go:52 ----
51 // Setup static files
52 app.Get("/public*", static.New("./public"))
53
Error: ./app.go:52:22: undefined: static
==== ./websocket ====
# main
---- source: ./websocket/./main.go:28 ----
27 // Upgraded websocket request
28 app.Get("/ws", websocket.New(func(c *websocket.Conn) {
29 fmt.Println(c.Locals("Host")) // "Localhost:3000"
Error: ./main.go:28:17: cannot use websocket.New(func(c *websocket.Conn) {…}) (value of func type "github.com/gofiber/fiber/v2".Handler) as "github.com/gofiber/fiber/v3".Handler value in argument to app.Get
==== ./websocket-chat ====
# main
---- source: ./websocket-chat/./main.go:65 ----
64
65 app.Get("/*", static.New("./home.html"))
66
Error: ./main.go:65:16: undefined: static
---- source: ./websocket-chat/./main.go:68 ----
67 app.Use(func(c fiber.Ctx) error {
68 if websocket.IsWebSocketUpgrade(c) { // Returns true if the client requested upgrade to the WebSocket protocol
69 return c.Next()
Error: ./main.go:68:35: cannot use c (variable of interface type "github.com/gofiber/fiber/v3".Ctx) as *"github.com/gofiber/fiber/v2".Ctx value in argument to websocket.IsWebSocketUpgrade
---- source: ./websocket-chat/./main.go:76 ----
75
76 app.Get("/ws", websocket.New(func(c *websocket.Conn) {
77 // When the function returns, unregister the client and close the connection
Error: ./main.go:76:17: cannot use websocket.New(func(c *websocket.Conn) {…}) (value of func type "github.com/gofiber/fiber/v2".Handler) as "github.com/gofiber/fiber/v3".Handler value in argument to app.Get
|
git checkout master -- . ':!.github' ':!*.md' find . -name go.mod -execdir sh -c 'echo "=== $(pwd) ==="; fiber migrate --to v3.0.0-beta.5 -f --hash="323d2c85c4a1e9444802c4253f5cb784a61290df"' \;
git checkout master -- . ':!.github' ':!*.md' find . -name go.mod -execdir sh -c 'echo "=== $(pwd) ==="; fiber migrate --to v3.0.0-beta.5 -f --hash="64a711307367c91fb92a56115cb363fc9fe8b466"' \;
git checkout master -- . ':!.github' ':!*.md' find . -name go.mod -execdir sh -c 'echo "=== $(pwd) ==="; fiber migrate --to v3.0.0-beta.5 -f --hash="64a711307367c91fb92a56115cb363fc9fe8b466"' \;
git checkout master -- . ':!.github' ':!*.md' find . -name go.mod -execdir sh -c 'echo "=== $(pwd) ==="; fiber migrate --to v3.0.0-beta.5 -f --hash="64a711307367c91fb92a56115cb363fc9fe8b466"' \;
Uh oh!
There was an error while loading. Please reload this page.