mohae / deepcopy

Deep copy things
MIT License
569 stars 122 forks source link

deepcopy: copy time.Time directly #5

Closed neild closed 7 years ago

neild commented 7 years ago

time.Time is immutable, so just copying it (e.g., "t1 = t2") is fine. Fixes TestTimeCopy. Fixes TestStructA with go1.9, by ensuring monotonic time values are copied. (Time.MarshalBinary does not preserve monotonic time.)

mohae commented 7 years ago

Thanks!

I appreciate the contribution.