diff --git a/src/install/install.go b/src/install/install.go index a280f61..83d29a1 100644 --- a/src/install/install.go +++ b/src/install/install.go @@ -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))