Linter configuration fixes and linting issues fixes.

Fixes #17.
This commit is contained in:
2020-02-29 22:41:06 +05:00
parent 11897d0e1a
commit 47672c586d
6 changed files with 17 additions and 9 deletions

View File

@@ -48,9 +48,9 @@ func pastePOSTWebInterface(ec echo.Context) error {
return ec.HTML(http.StatusBadRequest, errtpl)
}
// nolint
if !strings.ContainsAny(params["paste-keep-for"][0], "Mmhd") && params["paste-keep-for"][0] != "forever" {
c.Logger.Debug().Str("field value", params["paste-keep-for"][0]).Msg("'Keep paste for' field have invalid value")
errtpl := templater.GetErrorTemplate(ec, "Invalid 'Paste should be available for' parameter passed. Please do not try to hack us ;).")
return ec.HTML(http.StatusBadRequest, errtpl)