mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-11 11:50:24 +08:00
代码重构-基于gin,gorm
This commit is contained in:
9
base/utils/stack_trace_utils.go
Normal file
9
base/utils/stack_trace_utils.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package utils
|
||||
|
||||
import "runtime"
|
||||
|
||||
// 获取调用堆栈信息
|
||||
func GetStackTrace() string {
|
||||
var buf [2 << 10]byte
|
||||
return string(buf[:runtime.Stack(buf[:], false)])
|
||||
}
|
||||
Reference in New Issue
Block a user