From a4ff81d168e159f18b6d68e2c26ab4416ca66b20 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Fri, 28 Oct 2016 13:07:53 -0700 Subject: moving non-switch code out of switch --- system/admin/handlers.go | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'system') diff --git a/system/admin/handlers.go b/system/admin/handlers.go index 8cbfe0a..3960eed 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -628,31 +628,32 @@ func postsHandler(res http.ResponseWriter, req *http.Request) { ` if hasExt { created := q.Get("created") - switch created { - q.Set("created", "internal") - intURL := strings.TrimPrefix(req.URL.String(), req.URL.Scheme+req.URL.Host) - q.Set("created", "external") - extURL := strings.TrimPrefix(req.URL.String(), req.URL.Scheme+req.URL.Host) + q.Set("created", "internal") + intURL := strings.TrimPrefix(req.URL.String(), req.URL.Scheme+req.URL.Host) + + q.Set("created", "external") + extURL := strings.TrimPrefix(req.URL.String(), req.URL.Scheme+req.URL.Host) + + switch created { + case "internal": - case "internal": - html += `
Created by: - Internal + Internal  |  - External + External
` - case "external": + case "external": html += `
Created by: - Internal + Internal  |  - External + External
` } - + } html += `