Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ThisCaller ¶
func ThisCaller() string
ThisCaller returns a string identifying the function that invoked the function where ThisCaller was invoked. The return value is ${package}/${file}:${linenumber}. For example: Suppose we have file: mygomod/pkg/parent.go
func parent() {
child()
}
file: mygomod/pkg/child.go
func child() {
c := debug.ThisCaller()
}
The return value of ThisCaller will be "pkg/parent.go:2" Returning the full path wouldn't be useful because it would be the full path on the machine where the code was compiled
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.