diff --git a/.deadcode-out b/.deadcode-out index 6043eb64ba..4e72fc8649 100644 --- a/.deadcode-out +++ b/.deadcode-out @@ -233,9 +233,6 @@ code.gitea.io/gitea/modules/web RouteMock RouteMockReset -code.gitea.io/gitea/modules/web/middleware - DeleteLocaleCookie - code.gitea.io/gitea/modules/zstd NewWriter Writer.Write diff --git a/modules/web/middleware/locale.go b/modules/web/middleware/locale.go index 1f37407201..9653a6f349 100644 --- a/modules/web/middleware/locale.go +++ b/modules/web/middleware/locale.go @@ -53,9 +53,3 @@ func Locale(resp http.ResponseWriter, req *http.Request) translation.Locale { func SetLocaleCookie(resp http.ResponseWriter, lang string, maxAge int) { SetSiteCookie(resp, "lang", lang, maxAge) } - -// DeleteLocaleCookie convenience function to delete the locale cookie consistently -// Setting the lang cookie will trigger the middleware to reset the language to previous state. -func DeleteLocaleCookie(resp http.ResponseWriter) { - SetSiteCookie(resp, "lang", "", -1) -}