mirror of https://github.com/docker/cli.git
Merge pull request #1170 from vdemeester/omit-silvin
Add omitempty on compose config top-level types
This commit is contained in:
commit
18091ea7e2
|
@ -32,10 +32,6 @@ services:
|
||||||
image: bar
|
image: bar
|
||||||
foo:
|
foo:
|
||||||
image: foo
|
image: foo
|
||||||
networks: {}
|
|
||||||
volumes: {}
|
|
||||||
secrets: {}
|
|
||||||
configs: {}
|
|
||||||
`), s.ComposeFile)
|
`), s.ComposeFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,11 +73,11 @@ type Config struct {
|
||||||
Filename string `yaml:"-"`
|
Filename string `yaml:"-"`
|
||||||
Version string
|
Version string
|
||||||
Services Services
|
Services Services
|
||||||
Networks map[string]NetworkConfig
|
Networks map[string]NetworkConfig `yaml:",omitempty"`
|
||||||
Volumes map[string]VolumeConfig
|
Volumes map[string]VolumeConfig `yaml:",omitempty"`
|
||||||
Secrets map[string]SecretConfig
|
Secrets map[string]SecretConfig `yaml:",omitempty"`
|
||||||
Configs map[string]ConfigObjConfig
|
Configs map[string]ConfigObjConfig `yaml:",omitempty"`
|
||||||
Extras map[string]interface{} `yaml:",inline"`
|
Extras map[string]interface{} `yaml:",inline"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Services is a list of ServiceConfig
|
// Services is a list of ServiceConfig
|
||||||
|
|
Loading…
Reference in New Issue