优化代码

This commit is contained in:
刘祥超
2022-11-17 14:45:41 +08:00
parent 890296c88b
commit 69ab70b750

View File

@@ -29,7 +29,7 @@ func (this *errorObj) Error() string {
return s
}
// 新错误
// New 新错误
func New(errText string) error {
ptr, file, line, ok := runtime.Caller(1)
funcName := ""
@@ -45,7 +45,7 @@ func New(errText string) error {
}
}
// 包装已有错误
// Wrap 包装已有错误
func Wrap(err error) error {
if err == nil {
return nil