Thanks to @agnivade and @isacikgoz for their input
Этот коммит содержится в:
Tim Scheuermann
2022-06-23 18:07:02 +03:00
коммит произвёл GitHub
родитель f4dcffd8d3
Коммит 49bd76632b

Просмотреть файл

@@ -8,6 +8,7 @@ import (
"github.com/mattermost/mattermost-server/v6/model"
"github.com/mattermost/mattermost-server/v6/shared/i18n"
"github.com/mattermost/mattermost-server/v6/shared/mlog"
)
type Context struct {
@@ -18,6 +19,8 @@ type Context struct {
path string
userAgent string
acceptLanguage string
logger mlog.LoggerIFace
err *model.AppError
context context.Context
}
@@ -97,3 +100,19 @@ func (c *Context) SetContext(ctx context.Context) {
func (c *Context) GetT() i18n.TranslateFunc {
return c.t
}
func (c *Context) SetLogger(logger mlog.LoggerIFace) {
c.logger = logger
}
func (c *Context) Logger() mlog.LoggerIFace {
return c.logger
}
func (c *Context) SetAppError(err *model.AppError) {
c.err = err
}
func (c *Context) AppError() *model.AppError {
return c.err
}