diff --git a/TODO.MD b/TODO.MD index ad0ed6ff2..788d4e478 100644 --- a/TODO.MD +++ b/TODO.MD @@ -51,7 +51,7 @@ 1. 权限管理模块; 1. 从ghttp中剥离SESSION功能构成单独的模块gsession; 1. 改进gproc进程间通信处理逻辑,提高稳定性,以应对进程间大批量的数据发送/接收; - +1. gdb的Data方法支持struct参数传入; diff --git a/g/test/gtest/gtest.go b/g/test/gtest/gtest.go index e44266d82..2920481e9 100644 --- a/g/test/gtest/gtest.go +++ b/g/test/gtest/gtest.go @@ -215,12 +215,12 @@ func AssertNI(value, expect interface{}) { } } -// 提示错误不退出 +// 提示错误不退出进程执行 func Error(message...interface{}) { fmt.Fprintf(os.Stderr, "[ERROR] %s\n%s", fmt.Sprint(message...), getBacktrace()) } -// 提示错误并退出 +// 提示错误并退出进程执行 func Fatal(message...interface{}) { fmt.Fprintf(os.Stderr, "[FATAL] %s\n%s", fmt.Sprint(message...), getBacktrace()) os.Exit(1) @@ -270,7 +270,7 @@ func getBacktrace(skip...int) string { // 首先定位业务文件开始位置 for i := 0; i < 10; i++ { if _, file, _, ok := runtime.Caller(i); ok { - if reg, _ := regexp.Compile("/g/util/gtest/.+$"); !reg.MatchString(file) { + if reg, _ := regexp.Compile(`gtest\.go$`); !reg.MatchString(file) { from = i break } @@ -283,7 +283,7 @@ func getBacktrace(skip...int) string { if reg, _ := regexp.Compile(``); reg.MatchString(file) { continue } - if reg, _ := regexp.Compile("/g/test/gtest/.+$"); reg.MatchString(file) { + if reg, _ := regexp.Compile(`gtest\.go$`); reg.MatchString(file) { continue } if goRoot != "" {