forked from LaconicNetwork/kompose
Update vendoring as well as libcompose
This commit updates libcompose in order to merge in https://github.com/docker/libcompose/pull/423 which affected https://github.com/kubernetes-incubator/kompose/issues/92 by not erroring out when an image name wasn't provided. Closes https://github.com/kubernetes-incubator/kompose/issues/92 As well as knocks out the last required milestone for a 0.2.1 release https://github.com/kubernetes-incubator/kompose/milestone/2
This commit is contained in:
+9
-3
@@ -18,15 +18,21 @@ import (
|
||||
func ToTimeE(i interface{}) (tim time.Time, err error) {
|
||||
i = indirect(i)
|
||||
|
||||
switch s := i.(type) {
|
||||
switch v := i.(type) {
|
||||
case time.Time:
|
||||
return s, nil
|
||||
return v, nil
|
||||
case string:
|
||||
d, e := StringToDate(s)
|
||||
d, e := StringToDate(v)
|
||||
if e == nil {
|
||||
return d, nil
|
||||
}
|
||||
return time.Time{}, fmt.Errorf("Could not parse Date/Time format: %v\n", e)
|
||||
case int:
|
||||
return time.Unix(int64(v), 0), nil
|
||||
case int32:
|
||||
return time.Unix(int64(v), 0), nil
|
||||
case int64:
|
||||
return time.Unix(v, 0), nil
|
||||
default:
|
||||
return time.Time{}, fmt.Errorf("Unable to Cast %#v to Time\n", i)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user