mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-15 19:00:19 +00:00
16 lines
226 B
Go
16 lines
226 B
Go
|
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
|
||
|
}
|