mirror of
https://github.com/labstack/echo.git
synced 2025-07-17 01:43:02 +02:00
Renamed Context#Context => Context#StdContext & Context#SetContext to ContextSetStdContext, 2d772e02ca
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
13
context.go
13
context.go
@ -26,8 +26,11 @@ type (
|
||||
Context interface {
|
||||
context.Context
|
||||
|
||||
// SetContext sets `context.Context`.
|
||||
SetContext(context.Context)
|
||||
// StdContext returns `context.Context`.
|
||||
StdContext() context.Context
|
||||
|
||||
// SetStdContext sets `context.Context`.
|
||||
SetStdContext(context.Context)
|
||||
|
||||
// Request returns `engine.Request` interface.
|
||||
Request() engine.Request
|
||||
@ -190,7 +193,11 @@ const (
|
||||
indexPage = "index.html"
|
||||
)
|
||||
|
||||
func (c *echoContext) SetContext(ctx context.Context) {
|
||||
func (c *echoContext) StdContext() context.Context {
|
||||
return c.context
|
||||
}
|
||||
|
||||
func (c *echoContext) SetStdContext(ctx context.Context) {
|
||||
c.context = ctx
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user