Skip to content

Commit 1690a42

Browse files
committed
add todo
1 parent 64e471d commit 1690a42

File tree

1 file changed

+25
-28
lines changed

1 file changed

+25
-28
lines changed

Diff for: struct.go

+25-28
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
package delta
22

3-
import (
4-
"reflect"
5-
)
6-
7-
// ZipStructSlice 对Struct序列进行压缩
8-
func ZipStructSlice[T any](slice []T) {
9-
10-
}
11-
12-
func diff[T any](a, b T) *StructDelta {
13-
reflectA := reflect.ValueOf(a)
14-
reflectB := reflect.ValueOf(b)
15-
16-
switch reflectA.Type().Kind() {
17-
case reflect.String:
18-
19-
}
20-
}
21-
22-
type StructDelta struct {
23-
Init any
24-
FieldDeltaMap map[string]*FieldDelta
25-
}
26-
27-
type FieldDelta struct {
28-
FieldName string
29-
FieldValue string
30-
}
3+
// TODO 2022-12-2 00:17:18 struct的diff对比
4+
//// ZipStructSlice 对Struct序列进行压缩
5+
//func ZipStructSlice[T any](slice []T) {
6+
//
7+
//}
8+
//
9+
//func diff[T any](a, b T) *StructDelta {
10+
// reflectA := reflect.ValueOf(a)
11+
// reflectB := reflect.ValueOf(b)
12+
//
13+
// switch reflectA.Type().Kind() {
14+
// case reflect.String:
15+
//
16+
// }
17+
//}
18+
//
19+
//type StructDelta struct {
20+
// Init any
21+
// FieldDeltaMap map[string]*FieldDelta
22+
//}
23+
//
24+
//type FieldDelta struct {
25+
// FieldName string
26+
// FieldValue string
27+
//}

0 commit comments

Comments
 (0)