(router *Engine)
| 372 | } |
| 373 | |
| 374 | func githubConfigRouter(router *Engine) { |
| 375 | for _, route := range githubAPI { |
| 376 | router.Handle(route.method, route.path, func(c *Context) { |
| 377 | output := make(map[string]string, len(c.Params)+1) |
| 378 | output["status"] = "good" |
| 379 | for _, param := range c.Params { |
| 380 | output[param.Key] = param.Value |
| 381 | } |
| 382 | c.JSON(http.StatusOK, output) |
| 383 | }) |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | func TestGithubAPI(t *testing.T) { |
| 388 | DefaultWriter = os.Stdout |
no test coverage detected