From a2f479be31a0e678df16099b12018f5170bc91ed Mon Sep 17 00:00:00 2001 From: Azareal Date: Mon, 1 Apr 2019 17:04:02 +1000 Subject: [PATCH] Fix this little detail. --- gen_router.go | 2 +- router_gen/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gen_router.go b/gen_router.go index 30977b31..ba467035 100644 --- a/gen_router.go +++ b/gen_router.go @@ -728,7 +728,7 @@ func (r *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) { return } shost = spl[0] - if len(shost)==2 { + if len(spl)==2 { sport = spl[1] } } diff --git a/router_gen/main.go b/router_gen/main.go index c9517788..b185e04a 100644 --- a/router_gen/main.go +++ b/router_gen/main.go @@ -507,7 +507,7 @@ func (r *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) { return } shost = spl[0] - if len(shost)==2 { + if len(spl)==2 { sport = spl[1] } }