Skip to content

Commit e7d29cc

Browse files
committed
removed logging
1 parent 248879b commit e7d29cc

File tree

2 files changed

+60
-85
lines changed

2 files changed

+60
-85
lines changed

coverage.out

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,64 @@
11
mode: set
2+
github.com/GolangToolKits/grrt/reqRouter.go:36.71,40.53 1 1
3+
github.com/GolangToolKits/grrt/reqRouter.go:40.53,42.3 1 1
4+
github.com/GolangToolKits/grrt/reqRouter.go:42.8,45.16 3 1
5+
github.com/GolangToolKits/grrt/reqRouter.go:53.3,53.34 1 1
6+
github.com/GolangToolKits/grrt/reqRouter.go:45.16,48.23 3 1
7+
github.com/GolangToolKits/grrt/reqRouter.go:48.23,51.5 1 1
8+
github.com/GolangToolKits/grrt/reqRouter.go:53.34,55.4 1 1
9+
github.com/GolangToolKits/grrt/reqRouter.go:55.9,55.43 1 1
10+
github.com/GolangToolKits/grrt/reqRouter.go:55.43,57.4 1 1
11+
github.com/GolangToolKits/grrt/reqRouter.go:57.9,60.4 2 1
12+
github.com/GolangToolKits/grrt/reqRouter.go:65.38,69.2 3 1
13+
github.com/GolangToolKits/grrt/reqRouter.go:72.69,75.16 3 1
14+
github.com/GolangToolKits/grrt/reqRouter.go:89.2,89.11 1 1
15+
github.com/GolangToolKits/grrt/reqRouter.go:75.16,77.3 1 1
16+
github.com/GolangToolKits/grrt/reqRouter.go:77.8,79.28 2 1
17+
github.com/GolangToolKits/grrt/reqRouter.go:85.3,85.12 1 1
18+
github.com/GolangToolKits/grrt/reqRouter.go:79.28,80.55 1 1
19+
github.com/GolangToolKits/grrt/reqRouter.go:80.55,83.5 2 1
20+
github.com/GolangToolKits/grrt/reqRouter.go:85.12,87.4 1 1
21+
github.com/GolangToolKits/grrt/reqRouter.go:93.95,96.16 3 1
22+
github.com/GolangToolKits/grrt/reqRouter.go:110.2,110.11 1 1
23+
github.com/GolangToolKits/grrt/reqRouter.go:96.16,98.3 1 1
24+
github.com/GolangToolKits/grrt/reqRouter.go:98.8,100.28 2 1
25+
github.com/GolangToolKits/grrt/reqRouter.go:106.3,106.12 1 1
26+
github.com/GolangToolKits/grrt/reqRouter.go:100.28,101.55 1 1
27+
github.com/GolangToolKits/grrt/reqRouter.go:101.55,104.5 2 1
28+
github.com/GolangToolKits/grrt/reqRouter.go:106.12,108.4 1 1
29+
github.com/GolangToolKits/grrt/reqRouter.go:114.49,117.16 3 1
30+
github.com/GolangToolKits/grrt/reqRouter.go:120.2,120.11 1 1
31+
github.com/GolangToolKits/grrt/reqRouter.go:117.16,119.3 1 1
32+
github.com/GolangToolKits/grrt/reqRouter.go:124.34,126.2 1 1
33+
github.com/GolangToolKits/grrt/reqRouter.go:129.44,131.2 1 1
34+
github.com/GolangToolKits/grrt/reqRouter.go:134.55,137.28 3 1
35+
github.com/GolangToolKits/grrt/reqRouter.go:137.28,139.20 2 1
36+
github.com/GolangToolKits/grrt/reqRouter.go:142.3,142.55 1 1
37+
github.com/GolangToolKits/grrt/reqRouter.go:139.20,140.12 1 1
38+
github.com/GolangToolKits/grrt/reqRouter.go:147.55,151.2 3 1
39+
github.com/GolangToolKits/grrt/reqRouter.go:154.56,157.28 3 1
40+
github.com/GolangToolKits/grrt/reqRouter.go:157.28,159.20 2 1
41+
github.com/GolangToolKits/grrt/reqRouter.go:162.3,162.55 1 1
42+
github.com/GolangToolKits/grrt/reqRouter.go:159.20,160.12 1 1
43+
github.com/GolangToolKits/grrt/reqRouter.go:166.55,170.28 4 1
44+
github.com/GolangToolKits/grrt/reqRouter.go:173.2,173.30 1 1
45+
github.com/GolangToolKits/grrt/reqRouter.go:170.28,172.3 1 1
46+
github.com/GolangToolKits/grrt/reqRouter.go:176.49,180.2 3 1
47+
github.com/GolangToolKits/grrt/reqRouter.go:182.70,190.23 7 1
48+
github.com/GolangToolKits/grrt/reqRouter.go:211.2,211.19 1 1
49+
github.com/GolangToolKits/grrt/reqRouter.go:190.23,191.13 1 1
50+
github.com/GolangToolKits/grrt/reqRouter.go:196.3,198.17 3 1
51+
github.com/GolangToolKits/grrt/reqRouter.go:191.13,192.12 1 1
52+
github.com/GolangToolKits/grrt/reqRouter.go:193.9,193.19 1 1
53+
github.com/GolangToolKits/grrt/reqRouter.go:193.19,194.9 1 1
54+
github.com/GolangToolKits/grrt/reqRouter.go:198.17,199.28 1 1
55+
github.com/GolangToolKits/grrt/reqRouter.go:199.28,200.38 1 1
56+
github.com/GolangToolKits/grrt/reqRouter.go:200.38,204.11 4 1
57+
github.com/GolangToolKits/grrt/reqRouter.go:207.9,209.4 1 1
58+
github.com/GolangToolKits/grrt/reqRouter.go:214.96,216.36 2 1
59+
github.com/GolangToolKits/grrt/reqRouter.go:221.2,222.27 2 1
60+
github.com/GolangToolKits/grrt/reqRouter.go:216.36,217.32 1 1
61+
github.com/GolangToolKits/grrt/reqRouter.go:217.32,219.4 1 1
262
github.com/GolangToolKits/grrt/router.go:29.25,32.2 2 1
363
github.com/GolangToolKits/grrt/router.go:35.46,37.49 2 1
464
github.com/GolangToolKits/grrt/router.go:40.2,40.12 1 1
@@ -93,63 +153,3 @@ github.com/GolangToolKits/grrt/reqRoute.go:273.14,274.41 1 1
93153
github.com/GolangToolKits/grrt/reqRoute.go:274.41,276.4 1 1
94154
github.com/GolangToolKits/grrt/reqRoute.go:278.8,280.3 1 1
95155
github.com/GolangToolKits/grrt/reqRoute.go:284.55,288.2 3 1
96-
github.com/GolangToolKits/grrt/reqRouter.go:37.71,44.53 3 1
97-
github.com/GolangToolKits/grrt/reqRouter.go:44.53,47.3 2 1
98-
github.com/GolangToolKits/grrt/reqRouter.go:47.8,50.16 3 1
99-
github.com/GolangToolKits/grrt/reqRouter.go:58.3,58.34 1 1
100-
github.com/GolangToolKits/grrt/reqRouter.go:50.16,53.23 3 1
101-
github.com/GolangToolKits/grrt/reqRouter.go:53.23,56.5 1 1
102-
github.com/GolangToolKits/grrt/reqRouter.go:58.34,60.4 1 1
103-
github.com/GolangToolKits/grrt/reqRouter.go:60.9,60.43 1 1
104-
github.com/GolangToolKits/grrt/reqRouter.go:60.43,62.4 1 1
105-
github.com/GolangToolKits/grrt/reqRouter.go:62.9,65.4 2 1
106-
github.com/GolangToolKits/grrt/reqRouter.go:89.38,93.2 3 1
107-
github.com/GolangToolKits/grrt/reqRouter.go:96.69,99.16 3 1
108-
github.com/GolangToolKits/grrt/reqRouter.go:113.2,113.11 1 1
109-
github.com/GolangToolKits/grrt/reqRouter.go:99.16,101.3 1 1
110-
github.com/GolangToolKits/grrt/reqRouter.go:101.8,103.28 2 1
111-
github.com/GolangToolKits/grrt/reqRouter.go:109.3,109.12 1 1
112-
github.com/GolangToolKits/grrt/reqRouter.go:103.28,104.55 1 1
113-
github.com/GolangToolKits/grrt/reqRouter.go:104.55,107.5 2 1
114-
github.com/GolangToolKits/grrt/reqRouter.go:109.12,111.4 1 1
115-
github.com/GolangToolKits/grrt/reqRouter.go:117.95,120.16 3 1
116-
github.com/GolangToolKits/grrt/reqRouter.go:134.2,134.11 1 1
117-
github.com/GolangToolKits/grrt/reqRouter.go:120.16,122.3 1 1
118-
github.com/GolangToolKits/grrt/reqRouter.go:122.8,124.28 2 1
119-
github.com/GolangToolKits/grrt/reqRouter.go:130.3,130.12 1 1
120-
github.com/GolangToolKits/grrt/reqRouter.go:124.28,125.55 1 1
121-
github.com/GolangToolKits/grrt/reqRouter.go:125.55,128.5 2 1
122-
github.com/GolangToolKits/grrt/reqRouter.go:130.12,132.4 1 1
123-
github.com/GolangToolKits/grrt/reqRouter.go:138.49,141.16 3 1
124-
github.com/GolangToolKits/grrt/reqRouter.go:144.2,144.11 1 1
125-
github.com/GolangToolKits/grrt/reqRouter.go:141.16,143.3 1 1
126-
github.com/GolangToolKits/grrt/reqRouter.go:148.34,150.2 1 1
127-
github.com/GolangToolKits/grrt/reqRouter.go:153.44,155.2 1 1
128-
github.com/GolangToolKits/grrt/reqRouter.go:158.55,161.28 3 1
129-
github.com/GolangToolKits/grrt/reqRouter.go:161.28,163.20 2 1
130-
github.com/GolangToolKits/grrt/reqRouter.go:166.3,166.55 1 1
131-
github.com/GolangToolKits/grrt/reqRouter.go:163.20,164.12 1 1
132-
github.com/GolangToolKits/grrt/reqRouter.go:171.55,175.2 3 1
133-
github.com/GolangToolKits/grrt/reqRouter.go:178.56,181.28 3 1
134-
github.com/GolangToolKits/grrt/reqRouter.go:181.28,183.20 2 1
135-
github.com/GolangToolKits/grrt/reqRouter.go:186.3,186.55 1 1
136-
github.com/GolangToolKits/grrt/reqRouter.go:183.20,184.12 1 1
137-
github.com/GolangToolKits/grrt/reqRouter.go:190.55,195.28 5 1
138-
github.com/GolangToolKits/grrt/reqRouter.go:198.2,198.30 1 1
139-
github.com/GolangToolKits/grrt/reqRouter.go:195.28,197.3 1 1
140-
github.com/GolangToolKits/grrt/reqRouter.go:201.49,205.2 3 1
141-
github.com/GolangToolKits/grrt/reqRouter.go:207.70,215.23 7 1
142-
github.com/GolangToolKits/grrt/reqRouter.go:236.2,236.19 1 1
143-
github.com/GolangToolKits/grrt/reqRouter.go:215.23,216.13 1 1
144-
github.com/GolangToolKits/grrt/reqRouter.go:221.3,223.17 3 1
145-
github.com/GolangToolKits/grrt/reqRouter.go:216.13,217.12 1 1
146-
github.com/GolangToolKits/grrt/reqRouter.go:218.9,218.19 1 1
147-
github.com/GolangToolKits/grrt/reqRouter.go:218.19,219.9 1 1
148-
github.com/GolangToolKits/grrt/reqRouter.go:223.17,224.28 1 1
149-
github.com/GolangToolKits/grrt/reqRouter.go:224.28,225.38 1 1
150-
github.com/GolangToolKits/grrt/reqRouter.go:225.38,229.11 4 1
151-
github.com/GolangToolKits/grrt/reqRouter.go:232.9,234.4 1 1
152-
github.com/GolangToolKits/grrt/reqRouter.go:239.96,241.36 2 1
153-
github.com/GolangToolKits/grrt/reqRouter.go:246.2,247.27 2 1
154-
github.com/GolangToolKits/grrt/reqRouter.go:241.36,242.32 1 1
155-
github.com/GolangToolKits/grrt/reqRouter.go:242.32,244.4 1 1

reqRouter.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package grrt
66

77
import (
88
"context"
9-
"fmt"
109
"log"
1110
"net/http"
1211
"strings"
@@ -38,11 +37,7 @@ func (t *ReqRouter) ServeHTTP(w http.ResponseWriter, r *http.Request) {
3837
// When there is a match, the route variables can be retrieved calling
3938
// mux.Vars(request).
4039

41-
fmt.Println("cors enabled: :", t.corsEnabled)
42-
fmt.Println("cors method: :", r.Method)
43-
4440
if t.corsEnabled && r.Method == http.MethodOptions {
45-
fmt.Println("inside if ------")
4641
t.handleCors(w)
4742
} else {
4843
path := r.URL.Path
@@ -64,25 +59,6 @@ func (t *ReqRouter) ServeHTTP(w http.ResponseWriter, r *http.Request) {
6459
hd.ServeHTTP(w, r)
6560
}
6661
}
67-
68-
// path := r.URL.Path
69-
// var rt = t.findPrefix(path)
70-
// if rt == nil {
71-
// frt, fvars := t.findRouteAndVars(path)
72-
// rt = frt
73-
// if len(*fvars) > 0 {
74-
// r = t.requestWithVars(r, rt.GetVarNames(), fvars)
75-
// // rt = frt
76-
// }
77-
// }
78-
// if rt == nil || !rt.IsActive() {
79-
// w.WriteHeader(http.StatusNotFound)
80-
// } else if !rt.IsMethodAllowed(r.Method) {
81-
// w.WriteHeader(http.StatusMethodNotAllowed)
82-
// } else {
83-
// hd := rt.GetHandler()
84-
// hd.ServeHTTP(w, r)
85-
// }
8662
}
8763

8864
// NewRoute NewRoute
@@ -188,7 +164,6 @@ func (t *ReqRouter) SetCorsAllowedMethods(mths string) {
188164
}
189165

190166
func (t *ReqRouter) handleCors(w http.ResponseWriter) {
191-
fmt.Println("inside handleCors ------")
192167
w.Header().Set(corsAllowOriginHeader, strings.Join(t.allowedOrigins, ", "))
193168
w.Header().Set(corsAllowHeadersHeader, strings.Join(t.allowedHeaders, ", "))
194169
w.Header().Set(corsAllowMethodsHeader, strings.Join(t.allowedMethods, ", "))

0 commit comments

Comments
 (0)