More Greater Linting.

This commit is contained in:
2021-06-15 00:11:58 +05:00
parent 6ea6e2e144
commit 968d945205
28 changed files with 143 additions and 15 deletions

View File

@@ -39,6 +39,7 @@ func indexGet(ec echo.Context) error {
// We should check if database connection available.
dbConn := c.Database.GetDatabaseConnection()
if c.Config.Database.Type != flatfiles.FlatFileDialect && dbConn == nil {
// nolint:wrapcheck
return ec.Redirect(http.StatusFound, "/database_not_available")
}
@@ -55,5 +56,6 @@ func indexGet(ec echo.Context) error {
htmlData := templater.GetTemplate(ec, "index.html", map[string]string{"lexers": availableLexersSelectOpts, "captchaString": captchaString})
// nolint:wrapcheck
return ec.HTML(http.StatusOK, htmlData)
}