| 1 | package copystructure |
| 2 | |
| 3 | import ( |
| 4 | "reflect" |
| 5 | "time" |
| 6 | ) |
| 7 | |
| 8 | func init() { |
| 9 | Copiers[reflect.TypeOf(time.Time{})] = timeCopier |
| 10 | } |
| 11 | |
| 12 | func timeCopier(v interface{}) (interface{}, error) { |
| 13 | // Just... copy it. |
| 14 | return v.(time.Time), nil |
| 15 | } |