File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -8,17 +8,17 @@ import (
8
8
9
9
// Coco Framework
10
10
type Coco struct {
11
- httpRouter * httprouter.Router
12
- Request * http.Request
13
- ResponseWriter http.ResponseWriter
14
- Params httprouter.Params
15
- AdditionResponseHeaders map [string ]string
11
+ httpRouter * httprouter.Router
12
+ Request * http.Request
13
+ ResponseWriter http.ResponseWriter
14
+ Params httprouter.Params
15
+ Header map [string ]string
16
16
}
17
17
18
18
func NewCoco () * Coco {
19
19
c := Coco {
20
- httpRouter : httprouter .New (),
21
- AdditionResponseHeaders : make (map [string ]string ),
20
+ httpRouter : httprouter .New (),
21
+ Header : make (map [string ]string ),
22
22
}
23
23
return & c
24
24
}
@@ -30,7 +30,7 @@ func (c *Coco) ServeHTTP(w http.ResponseWriter, r *http.Request) {
30
30
//c.ResponseWriter = w
31
31
//handler := c.Router.data[r.RequestURI]
32
32
//handler(c)
33
- for key , val := range c .AdditionResponseHeaders {
33
+ for key , val := range c .Header {
34
34
w .Header ().Set (key , val )
35
35
}
36
36
c .httpRouter .ServeHTTP (w , r )
You can’t perform that action at this time.
0 commit comments