Writef formats according to a format specifier and writes to the response. Returns the number of bytes written and any write error encountered.
(format string, a ...interface{})
| 3354 | // |
| 3355 | // Returns the number of bytes written and any write error encountered. |
| 3356 | func (ctx *Context) Writef(format string, a ...interface{}) (n int, err error) { |
| 3357 | /* if len(a) == 0 { |
| 3358 | return ctx.WriteString(format) |
| 3359 | } ^ No, let it complain about arguments, because go test will do even if the app is running. |
| 3360 | Users should use WriteString instead of (format, args) |
| 3361 | when format may contain go-sprintf reserved chars (e.g. %).*/ |
| 3362 | |
| 3363 | return fmt.Fprintf(ctx.writer, format, a...) |
| 3364 | } |
| 3365 | |
| 3366 | // WriteString writes a simple string to the response. |
| 3367 | // |
no outgoing calls