Skip to content

Commit

Permalink
Add omitempty on compose config top-level types
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
  • Loading branch information
vdemeester committed Jul 2, 2018
1 parent 7c7c299 commit f05ab2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 0 additions & 4 deletions cli/command/stack/kubernetes/stackclient_test.go
Expand Up @@ -32,10 +32,6 @@ services:
image: bar
foo:
image: foo
networks: {}
volumes: {}
secrets: {}
configs: {}
`), s.ComposeFile)
}

Expand Down
10 changes: 5 additions & 5 deletions cli/compose/types/types.go
Expand Up @@ -73,11 +73,11 @@ type Config struct {
Filename string `yaml:"-"`
Version string
Services Services
Networks map[string]NetworkConfig
Volumes map[string]VolumeConfig
Secrets map[string]SecretConfig
Configs map[string]ConfigObjConfig
Extras map[string]interface{} `yaml:",inline"`
Networks map[string]NetworkConfig `yaml:",omitempty"`
Volumes map[string]VolumeConfig `yaml:",omitempty"`
Secrets map[string]SecretConfig `yaml:",omitempty"`
Configs map[string]ConfigObjConfig `yaml:",omitempty"`
Extras map[string]interface{} `yaml:",inline"`
}

// Services is a list of ServiceConfig
Expand Down

0 comments on commit f05ab2b

Please sign in to comment.