22 lines
435 B
Go
22 lines
435 B
Go
|
// Package trace ...
|
||
|
//
|
||
|
// Description : trace ...
|
||
|
//
|
||
|
// Author : go_developer@163.com<白茶清欢>
|
||
|
//
|
||
|
// Date : 2022-10-15 00:37
|
||
|
package trace
|
||
|
|
||
|
import "runtime"
|
||
|
|
||
|
// GetTraceFileInfo 获取文件 trace 信息
|
||
|
//
|
||
|
// Author : go_developer@163.com<白茶清欢>
|
||
|
//
|
||
|
// Date : 00:44 2022/10/15
|
||
|
func GetTraceFileInfo(offset int) CallStack {
|
||
|
stack := CallStack{}
|
||
|
_, stack.FilePath, stack.LineNo, _ = runtime.Caller(offset)
|
||
|
return stack
|
||
|
}
|