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

Method String

context/context.go:6651–6660  ·  view source on GitHub ↗

String returns the string representation of this request. It returns the Context's ID given by a `SetID`call, followed by the client's IP and the method:uri.

()

Source from the content-addressed store, hash-verified

6649// It returns the Context's ID given by a `SetID`call,
6650// followed by the client's IP and the method:uri.
6651func (ctx *Context) String() string {
6652 id := ctx.GetID()
6653 if id != nil {
6654 if stringer, ok := id.(fmt.Stringer); ok {
6655 id = stringer.String()
6656 }
6657 }
6658
6659 return fmt.Sprintf("[%v] %s ▶ %s:%s", id, ctx.RemoteAddr(), ctx.Method(), ctx.Request().RequestURI)
6660}

Callers

nothing calls this directly

Calls 5

GetIDMethod · 0.95
RemoteAddrMethod · 0.95
MethodMethod · 0.95
RequestMethod · 0.95
StringMethod · 0.65

Tested by

no test coverage detected