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