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

Method TOML

context.go:1233–1235  ·  view source on GitHub ↗

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

(code int, obj any)

Source from the content-addressed store, hash-verified

1231
1232// TOML serializes the given struct as TOML into the response body.
1233func (c *Context) TOML(code int, obj any) {
1234 c.Render(code, render.TOML{Data: obj})
1235}
1236
1237// ProtoBuf serializes the given struct as ProtoBuf into the response body.
1238func (c *Context) ProtoBuf(code int, obj any) {

Callers 2

NegotiateMethod · 0.95
TestContextRenderTOMLFunction · 0.80

Calls 1

RenderMethod · 0.95

Tested by 1

TestContextRenderTOMLFunction · 0.64