This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"runtime" | |
) | |
// whoCalledMe is a function that returns the name, fileName, and lineNumber of the caller that called function X | |
// the code doesn't check for edge cases | |
func whoCalledMe() (callerName, callerFileName string, callerLineNumber int) { |