Is it possible get information about caller function in Golang? For example if I have
func foo() { //Do something } func main() { foo() }
How can I get that foo has been called from main? I'm able to this in other language (for example in C# I just need to use CallerMemberName class attribute)
foo
main
CallerMemberName
2.1m questions
2.1m answers
60 comments
57.0k users