Vojtech Vitek (golang.cz)

Results 212 comments of Vojtech Vitek (golang.cz)

This feature is now available in [email protected]. See https://github.com/webrpc/webrpc/blob/master/CHANGELOG.md#webrpc-v0110.

Hi, yes you need to call `render.Status()` (HTTP response status code) before calling `render.JSON()` (HTTP response body). This is following how HTTP/1.1 works. You need to send headers before the...

I've upgraded the golang-basics example to chi v5 and it works as expected now. See #130

Another difference -- this fork was not vulnerable to upstream security issue https://pkg.go.dev/vuln/GO-2024-2883.

For reference: @[atticus-sullivan](https://github.com/atticus-sullivan) atticus-sullivan [4 hours ago](https://github.com/go-chi/render/pull/40#discussion_r1161080407) Not completely sure but as I see it, not using the Decoder/Encoder requires a double-pass over the data (1. collecting the []byte from...

Since we're discarding anything after the first JSON object, I think it's safe to close this issue. https://github.com/go-chi/render/blob/14f1cb3d5c2969d6e462632a205eacb6421eb4dc/decoder.go#L42

> As this works now fine for my case it fails for `{name}.{other}.json` It looks like the closest test cases are https://github.com/go-chi/chi/blob/master/tree_test.go#L223-L225 ```go tr.InsertRoute(mGET, "/articles/files/{file}.{ext}", hStub12) ``` ```go {m: mGET,...

Out of curiosity, have you tried using regex matcher or match the whole filename `/{filenameWithExt}` instead?

Regex returns the longest leftmost match. So if I put two greedy groups next to each other, I expect the left group to be "more" greedy than the right group....