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

Method Writef

context/context.go:3356–3364  ·  view source on GitHub ↗

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{})

Source from the content-addressed store, hash-verified

3354//
3355// Returns the number of bytes written and any write error encountered.
3356func (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//

Callers 15

TextMethod · 0.95
HTMLMethod · 0.95
testSessionsFunction · 0.80
mainFunction · 0.80
NewAppFunction · 0.80
newAppFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by 15

testSessionsFunction · 0.64
trFunction · 0.64
hFunction · 0.64
TestBasicAuthUseRouterFunction · 0.64
EndRequestMethod · 0.64
GetMethod · 0.64
PostMethod · 0.64
writeModelsFunction · 0.64
GetMethod · 0.64
GetMethod · 0.64