MCPcopy
hub / github.com/gin-gonic/gin / githubConfigRouter

Function githubConfigRouter

githubapi_test.go:374–385  ·  githubapi_test.go::githubConfigRouter
(router *Engine)

Source from the content-addressed store, hash-verified

372}
373
374func 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
387func TestGithubAPI(t *testing.T) {
388 DefaultWriter = os.Stdout

Callers 4

TestGithubAPIFunction · 0.85
BenchmarkGithubFunction · 0.85
BenchmarkParallelGithubFunction · 0.85

Calls 2

HandleMethod · 0.65
JSONMethod · 0.45

Tested by

no test coverage detected