MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / debug

Function debug

server/debug.go:19–34  ·  view source on GitHub ↗
(g *gin.RouterGroup)

Source from the content-addressed store, hash-verified

17}
18
19func debug(g *gin.RouterGroup) {
20 g.GET("/path/*path", middlewares.Down(sign.Verify), func(c *gin.Context) {
21 rawPath := c.Request.Context().Value(conf.PathKey).(string)
22 c.JSON(200, gin.H{
23 "path": rawPath,
24 })
25 })
26 g.GET("/hide_privacy", func(c *gin.Context) {
27 common.ErrorStrResp(c, "This is ip: 1.1.1.1", 400)
28 })
29 g.GET("/gc", func(c *gin.Context) {
30 runtime.GC()
31 c.String(http.StatusOK, "ok")
32 })
33 _pprof(g.Group("/pprof"))
34}

Callers 1

InitFunction · 0.85

Calls 5

DownFunction · 0.92
ErrorStrRespFunction · 0.92
_pprofFunction · 0.85
GCMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected