Context

Context groups the status available during the execution of a page, Action or handler.

This API is used in Context.


Symbols

SymbolClassDescription
ContexttypeContext defines a public type of API.
Context.HasErrorfuncIndicates if it exists HasError.

Context

Declaration:

gox
type Context struct {
	Request              Request
	Response             *Response
	Session              Session
	Body                 Body
	Writer               Writer
	Error                Error
}

Context defines a public type of API.

Fields

FieldTypeDescription
RequestRequestrequest associated with execution.
Response*ResponseThe associated response status.
SessionSessionAssociated session.
BodyBodyrequest body.
WriterWriterA writing destination.
ErrorErrorAssociated error.

Context.HasError

Declaration:

gox
func (c *Context) HasError() bool

Indicates if it exists HasError.

Returns

ReturnTypeDescription
valueboolIt indicates the result of the check.

Usage syntax

gox
value := context.HasError()

See also

Next step

Continue with Request structure and its properties.

Request