Updated Vendoring

This commit is contained in:
Suraj Narwade
2017-04-27 21:38:38 +05:30
parent 605d643a84
commit 1eb162d697
77 changed files with 2293 additions and 1354 deletions
+13
View File
@@ -10,6 +10,7 @@ import (
"github.com/docker/libcompose/utils"
composeYaml "github.com/docker/libcompose/yaml"
"gopkg.in/yaml.v2"
"reflect"
)
var (
@@ -60,6 +61,18 @@ func Merge(existingServices *ServiceConfigs, environmentLookup EnvironmentLookup
}
baseRawServices := config.Services
for service, data := range baseRawServices {
for key, value := range data {
//check for "extends" key and check whether it is string or not
if key == "extends" && reflect.TypeOf(value).Kind() == reflect.String {
//converting string to map
extendMap := make(map[interface{}]interface{})
extendMap["service"] = value
baseRawServices[service][key] = extendMap
}
}
}
if options.Interpolate {
if err := InterpolateRawServiceMap(&baseRawServices, environmentLookup); err != nil {
return "", nil, nil, nil, err