MCPcopy
hub / github.com/TarsCloud/TarsGo / FuncName

Function FuncName

tars/util/rogger/logger.go:422–433  ·  view source on GitHub ↗
(f *runtime.Func)

Source from the content-addressed store, hash-verified

420}
421
422func FuncName(f *runtime.Func) string {
423 name := f.Name()
424 idx := strings.LastIndexByte(name, '/')
425 if idx != -1 {
426 name = name[idx:]
427 idx = strings.IndexByte(name, '.')
428 if idx != -1 {
429 name = strings.TrimPrefix(name[idx:], ".")
430 }
431 }
432 return name
433}
434
435// FlushLogger flush all log to disk.
436func FlushLogger() {

Callers 5

writeLineMethod · 0.92
writeJsonMethod · 0.92
DyeingWritefMethod · 0.85
writeLineMethod · 0.85
writeJsonMethod · 0.85

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected