StringInSlice

This commit is contained in:
admju 2024-09-09 10:11:44 +00:00
parent a1af83689d
commit 550675a4aa

View File

@ -98,7 +98,7 @@ func (this *InstallClass) InstallCharts(modules []string) (error) {
for _, v := range this.charts {
for _, v1 := range v.Charts {
if len(modules) == 0 || stringInSlice(v1.Name, modules) {
if len(modules) == 0 || utils.StringInSlice(v1.Name, modules) {
wg.Add(1)
go func() {
@ -112,16 +112,6 @@ func (this *InstallClass) InstallCharts(modules []string) (error) {
return nil
}
func stringInSlice(a string, list []string) bool {
for _, b := range list {
if b == a {
return true
}
}
return false
}
func (this *InstallClass) installChart(helm_bin string, kubectl_bin string, chart chart.ChartData) {
log.Log().Info().Msg(fmt.Sprintf(" << Chart : %s ", chart.Name))