Simplify the marshaling of compose types.Config

- Add `Version` to `types.Config`
- Add a new `Services` types (that is just `[]ServiceConfig`) and add
  `MarshalYAML` method on it.
- Clean other top-level custom marshaling as `Services` is the only one
  required.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2018-02-21 18:31:52 +01:00
parent 939938b976
commit cf86a4d922
11 changed files with 60 additions and 70 deletions

View File

@ -18,7 +18,7 @@ import (
)
func deployCompose(ctx context.Context, dockerCli command.Cli, opts options.Deploy) error {
config, _, err := loader.LoadComposefile(dockerCli, opts)
config, err := loader.LoadComposefile(dockerCli, opts)
if err != nil {
return err
}