We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
just a question render/protobuf.go
type ProtoBuf struct { Data any } var protobufContentType = []string{"application/x-protobuf"} // Render (ProtoBuf) marshals the given interface object and writes data with custom ContentType. func (r ProtoBuf) Render(w http.ResponseWriter) error { r.WriteContentType(w) bytes, err := proto.Marshal(r.Data.(proto.Message))
why not use proto.Message for Data directly?
type ProtoBuf struct { Data proto.Message } ..... bytes, err := proto.Marshal(r.Data)
The text was updated successfully, but these errors were encountered:
Consistent with other "Render " in interface design
Sorry, something went wrong.
No branches or pull requests
just a question
render/protobuf.go
why not use proto.Message for Data directly?
The text was updated successfully, but these errors were encountered: