MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / loadLogInfo

Function loadLogInfo

core/middleware/operation.go:282–292  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

280}
281
282func loadLogInfo(path string) string {
283 path = replaceStr(path, "/api/v2", "/core", "/xpack", "/enterprise")
284 if !strings.Contains(path, "/") {
285 return ""
286 }
287 pathArrays := strings.Split(path, "/")
288 if len(pathArrays) < 2 {
289 return ""
290 }
291 return pathArrays[1]
292}
293
294func normalizeOperationPath(reqPath string) string {
295 pathItem := strings.TrimPrefix(reqPath, "/api/v2")

Callers 1

OperationLogFunction · 0.85

Calls 1

replaceStrFunction · 0.70

Tested by

no test coverage detected