Check dependencies before to crash...

This commit is contained in:
2021-12-03 11:49:32 +01:00
parent f145a27a3d
commit 87e26ca021
3 changed files with 52 additions and 24 deletions

View File

@@ -3,14 +3,14 @@ package compose
// Compose is a complete docker-compse representation.
type Compose struct {
Version string `yaml:"version"`
Services map[string]Service `yaml:"services"`
Services map[string]*Service `yaml:"services"`
Volumes map[string]interface{} `yaml:"volumes"`
}
// NewCompose resturs a Compose object.
func NewCompose() *Compose {
c := &Compose{}
c.Services = make(map[string]Service)
c.Services = make(map[string]*Service)
c.Volumes = make(map[string]interface{})
return c
}