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