vendor/github.com/spf13/cast/cast.go
changeset 260 445e01aede7e
parent 251 1c52a0eeb952
equal deleted inserted replaced
259:db4911b0c721 260:445e01aede7e
    15 }
    15 }
    16 
    16 
    17 // ToTime casts an interface to a time.Time type.
    17 // ToTime casts an interface to a time.Time type.
    18 func ToTime(i interface{}) time.Time {
    18 func ToTime(i interface{}) time.Time {
    19 	v, _ := ToTimeE(i)
    19 	v, _ := ToTimeE(i)
       
    20 	return v
       
    21 }
       
    22 
       
    23 func ToTimeInDefaultLocation(i interface{}, location *time.Location) time.Time {
       
    24 	v, _ := ToTimeInDefaultLocationE(i, location)
    20 	return v
    25 	return v
    21 }
    26 }
    22 
    27 
    23 // ToDuration casts an interface to a time.Duration type.
    28 // ToDuration casts an interface to a time.Duration type.
    24 func ToDuration(i interface{}) time.Duration {
    29 func ToDuration(i interface{}) time.Duration {