From 01b70a95c93b8442276fd312bac44a45ec859460 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Tue, 22 Nov 2016 13:09:17 +0100 Subject: [PATCH] Update aanand/compose-file to a3e58764f50597b6217fec07e9bff7225c4a1719 This fixes services networks list to be ignored when loading. Signed-off-by: Vincent Demeester --- vendor.conf | 2 +- vendor/github.com/aanand/compose-file/loader/loader.go | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/vendor.conf b/vendor.conf index d019a562dc..06897e3c43 100644 --- a/vendor.conf +++ b/vendor.conf @@ -132,7 +132,7 @@ github.com/flynn-archive/go-shlex 3f9db97f856818214da2e1057f8ad84803971cff github.com/docker/go-metrics 86138d05f285fd9737a99bee2d9be30866b59d72 # composefile -github.com/aanand/compose-file a70cb6ea5c403c383b5117dcd1dea78880a47824 +github.com/aanand/compose-file a3e58764f50597b6217fec07e9bff7225c4a1719 github.com/mitchellh/mapstructure f3009df150dadf309fdee4a54ed65c124afad715 github.com/xeipuuv/gojsonpointer e0fe6f68307607d540ed8eac07a342c33fa1b54a github.com/xeipuuv/gojsonreference e02fc20de94c78484cd5ffb007f8af96be030a45 diff --git a/vendor/github.com/aanand/compose-file/loader/loader.go b/vendor/github.com/aanand/compose-file/loader/loader.go index 7f68b0fb3a..bd25a843a3 100644 --- a/vendor/github.com/aanand/compose-file/loader/loader.go +++ b/vendor/github.com/aanand/compose-file/loader/loader.go @@ -515,13 +515,12 @@ func toYAMLName(name string) string { } func loadListOrStructMap(value interface{}, target reflect.Type) (interface{}, error) { - mapValue := reflect.MakeMap(target) - if list, ok := value.([]interface{}); ok { + mapValue := map[interface{}]interface{}{} for _, name := range list { - mapValue.SetMapIndex(reflect.ValueOf(name), reflect.ValueOf(nil)) + mapValue[name] = nil } - return mapValue.Interface(), nil + return mapValue, nil } return value, nil