fix router
This commit is contained in:
parent
f214c3166b
commit
80482e70a8
4 changed files with 29 additions and 24 deletions
|
|
@ -1,6 +1,8 @@
|
|||
package router
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
|
|
@ -16,7 +18,7 @@ type Context struct {
|
|||
|
||||
func (c *Context) Next() {
|
||||
c.index++
|
||||
c.handlers[c.index](c)
|
||||
c.chain[c.index](c)
|
||||
}
|
||||
|
||||
func (c *Context) JSON(status int, data interface{}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue