Helper marks the calling function as a log helper function. When logging file and line information, that function will be skipped. Helper may be called simultaneously from multiple goroutines.
()
| 16 | // When logging file and line information, that function will be skipped. |
| 17 | // Helper may be called simultaneously from multiple goroutines. |
| 18 | func Helper() { |
| 19 | name := callerName(1) |
| 20 | if name == "" || isHelper(name) { |
| 21 | return |
| 22 | } |
| 23 | markHelper(name) |
| 24 | } |
| 25 | |
| 26 | func isHelper(name string) bool { |
| 27 | helperMu.RLock() |
no test coverage detected