Damien Neil

Results 208 comments of Damien Neil

#513 is about the generated code. If I follow, this is about the JSON serialization. The `protojson` package implements the standard proto/JSON mapping defined at: https://protobuf.dev/programming-guides/proto3/#json Any changes to that...

What is the use case for permitting parameters on type aliases?

@griesemer I don't see what the refactoring case is for changing the constraints of a type. As you say, an alias is just an alternative name for a type, but...

> Is CopyTo guaranteed to have had no observable effect when it returns an errors.Is(,errors.ErrUnsupported) error? Yes.

The motivation for this proposal is to fix `io.Copy` when used with common standard library types such as `*os.File` and `*net.TCPConn`. It's perhaps not immediately obvious that `io.Copy` is broken....

We could constrain this to be internal-only, but I don't think it's worth it. We'd still have the complexity of the new methods, we'd just not be allowing anyone else...

You're sending a HEAD request to a handler that writes a response body. HEAD requests don't have a response body, of course, so the server needs to discard it. There...

> Which I'd argue implies that Write calls to the ResponseWriter should not return an error; that way, an existing handler written for a GET request is almost guaranteed to...

[`Request.PathValue`](https://pkg.go.dev/net/http#Request.PathValue) already conveys information from the mux, without any way for custom mux implementations to set it. Perhaps there should be some way for custom muxes to set `Request.Pattern` and...

> it can be set with [Request.SetPathValue](https://pkg.go.dev/net/http#Request.SetPathValue) Today I learned! In that case, I agree that there should be a corresponding `SetPattern`, or `Pattern` should just be a field of...