Fix slice index removing

This commit is contained in:
2022-05-07 17:39:03 +02:00
parent a4b848a83c
commit 2b1dc68303
2 changed files with 11 additions and 9 deletions

View File

@@ -61,11 +61,12 @@ func Generate(p *compose.Parser, katernayVersion, appName, appVersion, chartVers
}
}
// remove skipped services
// remove skipped services from the parsed data
for s := range skips {
for i, service := range p.Data.Services {
if service.Name == s {
p.Data.Services = append(p.Data.Services[:i], p.Data.Services[i+1:]...)
i--
break
}
}