Vojtech Vitek (golang.cz)

Results 212 comments of Vojtech Vitek (golang.cz)

Interesting, thank you. Mind investigating further, @dils2k?

This makes no sense. Please update your chi to v5 -- you're running some old unsupported version. And please share a reproducer as a Go test or as a Github...

You need to update to chi v5. ```diff import ( - "github.com/go-chi/chi" - "github.com/go-chi/chi/middleware" + "github.com/go-chi/chi/v5" + "github.com/go-chi/chi/v5/middleware" "net/http" ) ``` `go get -u github.com/go-chi/chi/v5`

We don't have official go-chi package for OTEL yet, but we might add it to https://github.com/go-chi/telemetry. However, check out https://github.com/riandyrn/otelchi, which looks very decent.

Yes, I think you can validate 1) explicitly in the handler 2) in a middleware (based on route->request type map) 3) or use https://github.com/webrpc/webrpc to enforce the request/response types

Hi @Andrei-hub11, Thanks for reaching out! It's unlikely we'd accept / merge any advanced timeout middleware options into chi core. We want to keep chi minimal. However, this still sounds...

@FarmerChillax We're hosting lots of middleware repositories under https://github.com/go-chi organization. In fact, we've pretty much locked chi's middleware package in favor of separate repositories. We'd like to avoid monorepo like...

Very good point. We can add README to the https://github.com/go-chi organization page or update chi's main README with more links etc. I'll think about it.

Hi, how would this look like when used from within HTTP handlers? Can you provide an example, please? Have you ever looked into https://github.com/go-chi/httplog?

Hi, 1) With `github.com/go-chi/httplog/v3` package, you can now log the error as part of the request log: ```go import "github.com/go-chi/httplog/v3" func SomeHandler(w http.ResponseWriter, r *http.Request) { ctx := r.Context() if...