refactor: clean code

This commit is contained in:
Fu Diwei
2025-01-21 00:42:28 +08:00
parent 6bdcfaaef0
commit d5568608f5
13 changed files with 85 additions and 91 deletions

View File

@@ -5,6 +5,8 @@ import (
"fmt"
"reflect"
"strings"
"github.com/usual2970/certimate/internal/pkg/utils/types"
)
// 表示默认的日志记录器类型。
@@ -21,7 +23,7 @@ func (l *DefaultLogger) Logt(tag string, data ...any) {
temp[0] = tag
for i, v := range data {
s := ""
if v == nil {
if types.IsNil(v) {
s = "<nil>"
} else {
switch reflect.ValueOf(v).Kind() {