From a58b9815bc33799a7883e11ea1cf11170730e56b Mon Sep 17 00:00:00 2001 From: Daan Sprenkels Date: Sat, 30 May 2020 19:29:27 +0200 Subject: [PATCH] Remove unused newPasteHandlerURLEncoded func; NFC --- handlers.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/handlers.go b/handlers.go index c9a6d8f..08ce727 100644 --- a/handlers.go +++ b/handlers.go @@ -265,19 +265,6 @@ func (rl *rushlink) newFileUploadPasteHandler(w http.ResponseWriter, r *http.Req rl.viewActionSuccess(w, r, paste, fu) } -func (rl *rushlink) newPasteHandlerURLEncoded(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { - if err := r.ParseForm(); err != nil { - next(w, r) - return - } - shorten := r.PostFormValue("shorten") - if shorten == "" { - rl.renderError(w, r, http.StatusBadRequest, "no 'shorten' param given\n") - return - } - rl.newRedirectPasteHandler(w, r, shorten) -} - func (rl *rushlink) newRedirectPasteHandler(w http.ResponseWriter, r *http.Request, rawurl string) { userURL, err := url.Parse(rawurl) if err != nil {