From c4706022d7d38ed8292ee0036aeeb1e055381fea Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Mon, 5 Sep 2016 12:27:00 -0400 Subject: [PATCH] udp: remove unnecessary returns in switch stmt --- frontend/udp/frontend.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/frontend/udp/frontend.go b/frontend/udp/frontend.go index 757ec13..4d0ef58 100644 --- a/frontend/udp/frontend.go +++ b/frontend/udp/frontend.go @@ -190,7 +190,6 @@ func (t *Frontend) handleRequest(r Request, w ResponseWriter) (actionName string } WriteConnectionID(w, txID, NewConnectionID(r.IP, time.Now(), t.PrivateKey)) - return case announceActionID: actionName = "announce" @@ -213,8 +212,6 @@ func (t *Frontend) handleRequest(r Request, w ResponseWriter) (actionName string go t.logic.AfterAnnounce(context.Background(), req, resp) - return - case scrapeActionID: actionName = "scrape" @@ -236,11 +233,10 @@ func (t *Frontend) handleRequest(r Request, w ResponseWriter) (actionName string go t.logic.AfterScrape(context.Background(), req, resp) - return - default: err = errUnknownAction WriteError(w, txID, err) - return } + + return }