TextYAML calls the Context.YAML method but with the text/yaml content type instead.
(v interface{})
| 4635 | |
| 4636 | // TextYAML calls the Context.YAML method but with the text/yaml content type instead. |
| 4637 | func (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 | // |
no test coverage detected