Martti T.
Martti T.
@behnambm this seems a lot like dependency injection containers. DI is hard to test/mock. Consider this approach ```go package main import ( "fmt" "github.com/labstack/echo/v4" "net/http" ) func main() { e...
Also please see this comment https://github.com/labstack/echo/issues/2075#issuecomment-1016819041
a little bit off-topic but https://grafana.com/blog/2024/02/09/how-i-write-http-services-in-go-after-13-years/ from Mat has excellent ideas for designing around testability
I am not in favor of add this. As adding handler to structs that have dependencies as members/fields is better solution. It is cleaner and does not involve "containers for...
Please do not use timeout middleware. and about `doneCh
if you are selecting from 2 channels `case err :=
I think your problem is with `x/net/websocket` library and with this https://github.com/golang/net/blob/765c7e89b3bdd76bfc210acddd3ca73931eb8d1d/websocket/server.go#L101 handshake method and that `403` originates from here https://github.com/golang/net/blob/765c7e89b3bdd76bfc210acddd3ca73931eb8d1d/websocket/server.go#L33
We have marked JWT middleware as deprecated in Echo core library and avoid changing it unless there are security or other very serious issues. Successor for JWT middleware is https://github.com/labstack/echo-jwt...
closing, JWT middleware is removed from core. For alternatives see https://github.com/labstack/echo-jwt/discussions/29
I think this is accetable feature, but please add at least one test for it.