From df9e43ba5f051081239fd1b533bafe119bf9dccf Mon Sep 17 00:00:00 2001 From: Mateusz Gozdek Date: Fri, 25 Sep 2020 13:49:29 +0200 Subject: [PATCH] cli/cmd: remove use of ... from applyComponents() As it does not add any value, as we create a slice of objects anyway instead of specifying them by hand. Signed-off-by: Mateusz Gozdek --- cli/cmd/component-apply.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/cmd/component-apply.go b/cli/cmd/component-apply.go index 263cc8085..5b01d5fdc 100644 --- a/cli/cmd/component-apply.go +++ b/cli/cmd/component-apply.go @@ -83,14 +83,14 @@ func componentApply(contextLogger *log.Entry, componentsList []string) error { return fmt.Errorf("suitable kubeconfig file not found. Did you run 'lokoctl cluster apply' ?") } - if err := applyComponents(lokoConfig, kubeconfig, componentsToApply...); err != nil { + if err := applyComponents(lokoConfig, kubeconfig, componentsToApply); err != nil { return fmt.Errorf("applying components: %w", err) } return nil } -func applyComponents(lokoConfig *config.Config, kubeconfig []byte, componentNames ...string) error { +func applyComponents(lokoConfig *config.Config, kubeconfig []byte, componentNames []string) error { for _, componentName := range componentNames { fmt.Printf("Applying component '%s'...\n", componentName)