remove else to improve readability

This commit is contained in:
Antoni Sawicki 2020-10-26 01:42:11 -07:00
parent 3ff226e1df
commit 3dddb70be0

15
wrp.go
View File

@ -173,13 +173,13 @@ func pageServer(out http.ResponseWriter, req *http.Request) {
w.req = req w.req = req
w.out = out w.out = out
w.parseForm() w.parseForm()
if len(w.url) > 4 { if len(w.url) < 4 {
w.navigate()
w.capture()
} else {
w.printPage("#FFFFFF") w.printPage("#FFFFFF")
w.printFooter("", "") w.printFooter("", "")
return
} }
w.navigate()
w.capture()
} }
// Process HTTP requests to ISMAP '/map/' url // Process HTTP requests to ISMAP '/map/' url
@ -203,13 +203,12 @@ func mapServer(out http.ResponseWriter, req *http.Request) {
return return
} }
log.Printf("%s WrpReq from ISMAP: %+v\n", req.RemoteAddr, w) log.Printf("%s WrpReq from ISMAP: %+v\n", req.RemoteAddr, w)
if len(w.url) > 4 { if len(w.url) < 4 {
w.navigate()
w.capture()
} else {
w.printPage("#FFFFFF") w.printPage("#FFFFFF")
w.printFooter("", "") w.printFooter("", "")
} }
w.navigate()
w.capture()
} }
// Process HTTP requests for images '/img/' url // Process HTTP requests for images '/img/' url