package controllers import ( "Medical_ERP/common/global" ) type ErrorController struct { BaseController } func (c *ErrorController) Error404() { //c.Data["content"] = "page not found" c.Error(global.PageNotFoundErr, nil, "page not found") } func (c *ErrorController) Error500() { //c.Data["content"] = "server error" c.Error(global.MsgErr, nil, "server error") } func (c *ErrorController) ErrorDb() { c.Error(global.MsgErr, nil, "database is now down") }