forked from ebhomengo/niki
1
0
Fork 0
niki/vendor/github.com/mitchellh/copystructure/copier_time.go

21 lines
231 B
Go
Raw Normal View History

2024-02-18 10:42:21 +00:00
package copystructure
import (
"reflect"
"time"
)
func init() {
2024-02-18 10:42:21 +00:00
Copiers[reflect.TypeOf(time.Time{})] = timeCopier
2024-02-18 10:42:21 +00:00
}
func timeCopier(v interface{}) (interface{}, error) {
2024-02-18 10:42:21 +00:00
// Just... copy it.
2024-02-18 10:42:21 +00:00
return v.(time.Time), nil
2024-02-18 10:42:21 +00:00
}