samber / slog-fiber

🚨 Fiber middleware for slog logger
https://pkg.go.dev/github.com/samber/slog-fiber
MIT License
53 stars 9 forks source link

error fiber v3 using #21

Closed Phandorin closed 5 months ago

Phandorin commented 5 months ago

fiber v3 handler does not use pointer in new handler function:

panic: use: invalid handler func(*fiber.Ctx) error

Do you fix this in nearest time? Thank you!

samber commented 5 months ago

Hi @Phandorin

Can you start a "fiber-v3" branch please and make changes?

githugt commented 3 months ago

Seeing as a tag isn't yet created for this, do you want to create that tag or delete this from the readme.md ?

# Fiber v3 (beta)
go get github.com/samber/slog-echo@fiber-v3

Because, currently, running

go get github.com/samber/slog-echo@fiber-v3

would give OP's error (invalid version: unknown revision fiber-v3) due to the relevant git tag missing. And github.com/samber/slog-fiber would fail with invalid handler if they use v3 version of fiber.

samber commented 3 months ago

The right command is:

go get github.com/samber/slog-fiber@fiber-v3

Sorry for the issue.