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

Method IsRecording

context/context.go:6077–6084  ·  view source on GitHub ↗

IsRecording returns the response recorder and a true value when the response writer is recording the status code, body, headers and so on, else returns nil and false.

()

Source from the content-addressed store, hash-verified

6075// when the response writer is recording the status code, body, headers and so on,
6076// else returns nil and false.
6077func (ctx *Context) IsRecording() (*ResponseRecorder, bool) {
6078 // NOTE:
6079 // two return values in order to minimize the if statement:
6080 // if (Recording) then writer = Recorder()
6081 // instead we do: recorder,ok = Recording()
6082 rr, ok := ctx.writer.(*ResponseRecorder)
6083 return rr, ok
6084}
6085
6086// Exec calls the framewrok's ServeHTTPC
6087// based on this context but with a changed method and path

Callers 2

ResetResponseWriterMethod · 0.95
FireErrorCodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected