From 3900998641b09f23264762f0fe80f72ac1361e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E5=BF=B5?= <1@72wo.cn> Date: Wed, 2 Jul 2025 22:41:13 +0800 Subject: [PATCH] =?UTF-8?q?test(common):=20=E6=B7=BB=E5=8A=A0=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=BA=93=E5=B9=B6=E6=89=93=E5=8D=B0=E5=A0=86=E6=A0=88?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 引入 glog 库用于日志记录 - 在 TestInit 函数中添加打印堆栈信息的代码 --- common/serialize/test_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/serialize/test_test.go b/common/serialize/test_test.go index 2e7ea18a2..e05cb0500 100644 --- a/common/serialize/test_test.go +++ b/common/serialize/test_test.go @@ -8,6 +8,7 @@ import ( "testing" "github.com/apcera/termtables" + "github.com/gogf/gf/v2/os/glog" "github.com/pointernil/bitset32" ) @@ -47,7 +48,7 @@ func TestInit(t *testing.T) { table.AddRow("John", "30") table.AddRow("Sam", 18) table.AddRow("Julie", 20.14) - + fmt.Println(glog.GetStack()) fmt.Println(table.Render()) }