-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time.Time problem #6
Comments
Output (encryptedOrder) = {Bob [email protected] {Bobby 0001-01-01 00:00:00 +0000 UTC}} |
+1 |
Same issue here, is the PR going to be merged ? |
@forever-eight @onyxg Maintainer doesn't seem to be active so I forked the repo and made a fix handle the time.Time : https://github.com/0cnLaroche/go-deepcopy |
FWIIW, I did a from scratch reimplementation of this here: https://github.com/brunoga/deep Not only it supports time.Time, it also supports all unexported fields as long as they have a supported type. |
}
type Member struct {
Name string
bson:"name"
Type string
bson:"type"
Date time.Time
}
u := User{
Name: "Bob",
Email: "[email protected]",
Member: Member{
Name: "Bobby",
Date: time.Now(),
},
}
encryptedOrder := deepcopy.MustAnything(u).(User)
time.Time won't work correctly
The text was updated successfully, but these errors were encountered: