test(common): 添加日志库并打印堆栈信息
- 引入 glog 库用于日志记录 - 在 TestInit 函数中添加打印堆栈信息的代码
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/apcera/termtables"
|
"github.com/apcera/termtables"
|
||||||
|
"github.com/gogf/gf/v2/os/glog"
|
||||||
"github.com/pointernil/bitset32"
|
"github.com/pointernil/bitset32"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ func TestInit(t *testing.T) {
|
|||||||
table.AddRow("John", "30")
|
table.AddRow("John", "30")
|
||||||
table.AddRow("Sam", 18)
|
table.AddRow("Sam", 18)
|
||||||
table.AddRow("Julie", 20.14)
|
table.AddRow("Julie", 20.14)
|
||||||
|
fmt.Println(glog.GetStack())
|
||||||
fmt.Println(table.Render())
|
fmt.Println(table.Render())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user