MCPcopy
hub / github.com/zincsearch/zincsearch / server

Function server

test/api/init.go:83–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81)
82
83func server() *gin.Engine {
84 if r == nil {
85 once.Do(func() {
86 gin.SetMode(gin.ReleaseMode)
87 r = gin.New()
88 r.Use(gin.Recovery())
89 routes.SetRoutes(r)
90 })
91 }
92
93 return r
94}
95
96func request(method, api string, body io.Reader) *httptest.ResponseRecorder {
97 req, _ := http.NewRequest(method, api, body)

Callers 3

requestFunction · 0.85
TestAuthFunction · 0.85
TestApiBaseFunction · 0.85

Calls 1

SetRoutesFunction · 0.92

Tested by 2

TestAuthFunction · 0.68
TestApiBaseFunction · 0.68