This commit is contained in:
aozhiwei 2024-08-06 13:44:13 +08:00
parent a739b0223e
commit 26d8a01994

View File

@ -166,6 +166,9 @@ func UnmarshalModelList[T any](ds *DataSet, models *[]*T) error {
return resultErr return resultErr
} }
/*
目前不支持指针!!!
*/
func UnmarshalModel[T any](ds *DataSet, m *T) error { func UnmarshalModel[T any](ds *DataSet, m *T) error {
mType := reflect.TypeOf(m).Elem() mType := reflect.TypeOf(m).Elem()
mVal := reflect.ValueOf(m).Elem() mVal := reflect.ValueOf(m).Elem()