Skip to content

Commit 55092d5

Browse files
committed
refactor: 优化代码风格与类型检查
将 `reflect.Ptr` 替换为 `reflect.Pointer` 以使用更推荐的类型常量,并移除冗余空行。
1 parent 78cad07 commit 55092d5

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

database/gdb/gdb_model_with.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ func (m *Model) doWithScanStructs(pointer any) error {
208208
reflectValue = reflect.ValueOf(pointer)
209209
reflectKind = reflectValue.Kind()
210210
)
211-
if reflectKind == reflect.Ptr {
211+
if reflectKind == reflect.Pointer {
212212
reflectValue = reflectValue.Elem()
213213
reflectKind = reflectValue.Kind()
214214
}

encoding/gjson/gjson_api_new_load_content.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ func loadContentWithOptions(data []byte, options Options) (*Json, error) {
224224
return NewWithOptions(decodedData, options), nil
225225

226226
default:
227-
228227
}
229228
// ignore some duplicated types, like js and yml,
230229
// which are not necessary shown in error message.

0 commit comments

Comments
 (0)