MCPcopy Create free account
hub / github.com/kataras/iris / TextYAML

Method TextYAML

context/context.go:4637–4647  ·  view source on GitHub ↗

TextYAML calls the Context.YAML method but with the text/yaml content type instead.

(v interface{})

Source from the content-addressed store, hash-verified

4635
4636// TextYAML calls the Context.YAML method but with the text/yaml content type instead.
4637func (ctx *Context) TextYAML(v interface{}) error {
4638 ctx.ContentType(ContentYAMLTextHeaderValue)
4639
4640 err := WriteYAML(ctx, v, 4)
4641 if err != nil {
4642 ctx.handleContextError(err)
4643 return err
4644 }
4645
4646 return nil
4647}
4648
4649// Protobuf marshals the given "v" value of proto Message and writes its result to the client.
4650//

Callers 2

NegotiateMethod · 0.95
mainFunction · 0.45

Calls 2

ContentTypeMethod · 0.95
handleContextErrorMethod · 0.95

Tested by

no test coverage detected