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:
Charlie Drage
2017-01-04 13:18:07 -05:00
parent 6e260bab0b
commit 57039425b6
26 changed files with 640 additions and 429 deletions
+9 -3
View File
@@ -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)
}