Settings: Rename constants/variables to follow Go naming standards (#28002)
* settings: Rename constants/variables to follow Go naming standards Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -25,7 +25,7 @@ type ReqContext struct {
|
||||
func (ctx *ReqContext) Handle(status int, title string, err error) {
|
||||
if err != nil {
|
||||
ctx.Logger.Error(title, "error", err)
|
||||
if setting.Env != setting.PROD {
|
||||
if setting.Env != setting.Prod {
|
||||
ctx.Data["ErrorMsg"] = err
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ func (ctx *ReqContext) Handle(status int, title string, err error) {
|
||||
ctx.Data["AppSubUrl"] = setting.AppSubUrl
|
||||
ctx.Data["Theme"] = "dark"
|
||||
|
||||
ctx.HTML(status, setting.ERR_TEMPLATE_NAME)
|
||||
ctx.HTML(status, setting.ErrTemplateName)
|
||||
}
|
||||
|
||||
func (ctx *ReqContext) JsonOK(message string) {
|
||||
@@ -52,7 +52,7 @@ func (ctx *ReqContext) JsonApiErr(status int, message string, err error) {
|
||||
|
||||
if err != nil {
|
||||
ctx.Logger.Error(message, "error", err)
|
||||
if setting.Env != setting.PROD {
|
||||
if setting.Env != setting.Prod {
|
||||
resp["error"] = err.Error()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user