Context
Context groups the status available during the execution of a page, Action or handler.
This API is used in Context.
Symbols
| Symbol | Class | Description |
|---|---|---|
| Context | type | Context defines a public type of API. |
| Context.HasError | func | Indicates if it exists HasError. |
Context
Declaration:
type Context struct {
Request Request
Response *Response
Session Session
Body Body
Writer Writer
Error Error
} Context defines a public type of API.
Fields
| Field | Type | Description |
|---|---|---|
Request | Request | request associated with execution. |
Response | *Response | The associated response status. |
Session | Session | Associated session. |
Body | Body | request body. |
Writer | Writer | A writing destination. |
Error | Error | Associated error. |
Context.HasError
Declaration:
func (c *Context) HasError() bool Indicates if it exists HasError.
Returns
| Return | Type | Description |
|---|---|---|
value | bool | It indicates the result of the check. |
Usage syntax
value := context.HasError()