MCPcopy
hub / github.com/gin-gonic/gin / ProtoBuf

Method ProtoBuf

context.go:1238–1240  ·  view source on GitHub ↗

ProtoBuf serializes the given struct as ProtoBuf into the response body.

(code int, obj any)

Source from the content-addressed store, hash-verified

1236
1237// ProtoBuf serializes the given struct as ProtoBuf into the response body.
1238func (c *Context) ProtoBuf(code int, obj any) {
1239 c.Render(code, render.ProtoBuf{Data: obj})
1240}
1241
1242// BSON serializes the given struct as BSON into the response body.
1243func (c *Context) BSON(code int, obj any) {

Callers 2

NegotiateMethod · 0.95

Calls 1

RenderMethod · 0.95

Tested by 1