Closed EchoGroot closed 1 year ago
I assume you refer to this time.Time
struct: https://cs.opensource.google/go/go/+/master:src/time/time.go;l=129;drc=f78efc0178d51c02beff8a8203910dc0a9c6e953
All of the fields in this struct are private. Copying private fields is not supported at this moment.
This way can solve my problem.
copy#StructToMap()
I'll work on a possible solution that would solve this issue in general, not just for time.Time
structs.
Please, take a look at PR https://github.com/mennanov/fieldmask-utils/pull/28
Will it work for you?
yes it work,thanks
time.Time transport to empty map by structx.StructToMapByFieldMask![image](https://user-images.githubusercontent.com/44628981/189830700-9d5bf776-6d7a-42dd-a607-cad600229192.png)
println(fmt.Sprintf("%T", updateField["CreateTime"]))----------> map[string]interface {}