14 lines
201 B
Go
14 lines
201 B
Go
|
package log
|
||
|
|
||
|
import (
|
||
|
"runtime"
|
||
|
)
|
||
|
|
||
|
func Call() Msg {
|
||
|
var pc [1]uintptr
|
||
|
n := runtime.Callers(4, pc[:])
|
||
|
fs := runtime.CallersFrames(pc[:n])
|
||
|
f, _ := fs.Next()
|
||
|
return Fmsg("called %q", f.Function)
|
||
|
}
|