From e9179ff0182928eb01687cacbeb48e8258b961e9 Mon Sep 17 00:00:00 2001 From: bijayasharma Date: Fri, 16 Apr 2021 09:36:22 -0400 Subject: [PATCH] Fix typos in various files Signed-off-by: bijayasharma Change-Id: Ibe0066e74497c3caecc50e1187abd0bde7955b04 --- cmd/baremetal/baremetal.go | 2 +- cmd/baremetal/ejectmedia.go | 2 +- cmd/baremetal/poweroff.go | 2 +- cmd/baremetal/poweron.go | 2 +- cmd/baremetal/reboot.go | 2 +- pkg/cluster/command.go | 2 +- pkg/k8s/kubeconfig/builder.go | 12 ++++++------ pkg/k8s/kubeconfig/builder_test.go | 4 ++-- pkg/phase/client.go | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cmd/baremetal/baremetal.go b/cmd/baremetal/baremetal.go index 04f8718c9..7b1b0cfc5 100644 --- a/cmd/baremetal/baremetal.go +++ b/cmd/baremetal/baremetal.go @@ -51,7 +51,7 @@ var ( based on the --%s, --%s and --%s flags provided. If no flags are provided airshipctl will try to select all baremetal hosts in the inventory`, flagName, flagNamespace, flagLabel) - bmhActionExampleTempalte = ` + bmhActionExampleTemplate = ` Perform action against hosts with name rdm9r3s3 in all namespaces where the host is found # airshipctl baremetal %[1]s --name rdm9r3s3 diff --git a/cmd/baremetal/ejectmedia.go b/cmd/baremetal/ejectmedia.go index 9393c933e..37c76539f 100644 --- a/cmd/baremetal/ejectmedia.go +++ b/cmd/baremetal/ejectmedia.go @@ -32,7 +32,7 @@ Eject media attached to a baremetal hosts %s `, selectorsDescription) - ejectMediaExample = fmt.Sprintf(bmhActionExampleTempalte, ejectMediaCommand) + ejectMediaExample = fmt.Sprintf(bmhActionExampleTemplate, ejectMediaCommand) ) // NewEjectMediaCommand provides a command to eject media attached to a baremetal host. diff --git a/cmd/baremetal/poweroff.go b/cmd/baremetal/poweroff.go index 1705a25de..c67fe4654 100644 --- a/cmd/baremetal/poweroff.go +++ b/cmd/baremetal/poweroff.go @@ -32,7 +32,7 @@ Power off baremetal hosts %s `, selectorsDescription) - powerOffExample = fmt.Sprintf(bmhActionExampleTempalte, powerOffCommand) + powerOffExample = fmt.Sprintf(bmhActionExampleTemplate, powerOffCommand) ) // NewPowerOffCommand provides a command to shutdown a remote host. diff --git a/cmd/baremetal/poweron.go b/cmd/baremetal/poweron.go index 53c85e023..d84a89098 100644 --- a/cmd/baremetal/poweron.go +++ b/cmd/baremetal/poweron.go @@ -32,7 +32,7 @@ Power on baremetal hosts %s `, selectorsDescription) - powerOnExample = fmt.Sprintf(bmhActionExampleTempalte, powerOnCommand) + powerOnExample = fmt.Sprintf(bmhActionExampleTemplate, powerOnCommand) ) // NewPowerOnCommand provides a command with the capability to power on baremetal hosts. diff --git a/cmd/baremetal/reboot.go b/cmd/baremetal/reboot.go index be3481bd7..9a481eb6a 100644 --- a/cmd/baremetal/reboot.go +++ b/cmd/baremetal/reboot.go @@ -32,7 +32,7 @@ Reboot baremetal hosts %s `, selectorsDescription) - rebootExample = fmt.Sprintf(bmhActionExampleTempalte, rebootCommand) + rebootExample = fmt.Sprintf(bmhActionExampleTemplate, rebootCommand) ) // NewRebootCommand provides a command with the capability to reboot baremetal hosts. diff --git a/pkg/cluster/command.go b/pkg/cluster/command.go index 876512e51..6a618355c 100755 --- a/pkg/cluster/command.go +++ b/pkg/cluster/command.go @@ -85,7 +85,7 @@ func (cmd *GetKubeconfigCommand) RunE(cfgFactory config.Factory, writer io.Write kubeconf := kubeconfig.NewBuilder(). WithBundle(helper.PhaseConfigBundle()). - WithClusterctClient(client). + WithClusterctlClient(client). WithClusterMap(cMap). WithClusterName(cmd.ClusterName). WithTempRoot(helper.WorkDir()). diff --git a/pkg/k8s/kubeconfig/builder.go b/pkg/k8s/kubeconfig/builder.go index 0b64cd2b1..12e1fec67 100644 --- a/pkg/k8s/kubeconfig/builder.go +++ b/pkg/k8s/kubeconfig/builder.go @@ -75,15 +75,15 @@ func (b *Builder) WithTempRoot(root string) *Builder { return b } -// WithClusterctClient this is used if u want to inject your own clusterctl +// WithClusterctlClient this is used if u want to inject your own clusterctl // mostly needed for tests -func (b *Builder) WithClusterctClient(c client.Interface) *Builder { +func (b *Builder) WithClusterctlClient(c client.Interface) *Builder { b.clusterctlClient = c return b } -// WithFilesytem allows to set filesystem -func (b *Builder) WithFilesytem(fs fs.FileSystem) *Builder { +// WithFilesystem allows to set filesystem +func (b *Builder) WithFilesystem(fs fs.FileSystem) *Builder { b.fs = fs return b } @@ -164,7 +164,7 @@ func (b *Builder) buildOne(clusterID string) (string, *api.Config, error) { } // if error, log it and ignore it. missing problem with one kubeconfig should not // effect other clusters, which don't depend on it. If they do depend on it, their calls - // will fail because the context will be missing. Combitation with a log message will make + // will fail because the context will be missing. Combination with a log message will make // it clear where the problem is. log.Debugf("Received error while trying kubeconfig source for cluster '%s', source type '%s', error '%v'", clusterID, source.Type, sourceErr) @@ -225,7 +225,7 @@ func (b *Builder) fromClusterAPI(clusterName string, ref v1alpha1.KubeconfigSour } } - log.Debugf("Getting child kubeconfig from parent, parent context '%s', parent kubeconfing '%s'", + log.Debugf("Getting child kubeconfig from parent, parent context '%s', parent kubeconfig '%s'", parentContext, f) return FromSecret(b.clusterctlClient, &client.GetKubeconfigOptions{ ParentKubeconfigPath: f, diff --git a/pkg/k8s/kubeconfig/builder_test.go b/pkg/k8s/kubeconfig/builder_test.go index 10f9e2236..4df7fdf2e 100644 --- a/pkg/k8s/kubeconfig/builder_test.go +++ b/pkg/k8s/kubeconfig/builder_test.go @@ -263,8 +263,8 @@ func TestBuilderClusterctl(t *testing.T) { WithClusterName(tt.requestedClusterName). WithBundle(testBundle). WithTempRoot(tt.tempRoot). - WithClusterctClient(tt.clusterctlClient). - WithFilesytem(tt.fs). + WithClusterctlClient(tt.clusterctlClient). + WithFilesystem(tt.fs). Build() require.NotNil(t, kube) filePath, cleanup, err := kube.GetFile() diff --git a/pkg/phase/client.go b/pkg/phase/client.go index 1221ccd20..d106a7cdc 100644 --- a/pkg/phase/client.go +++ b/pkg/phase/client.go @@ -99,7 +99,7 @@ func (p *phase) Executor() (ifc.Executor, error) { WithBundle(p.helper.PhaseConfigBundle()). WithClusterMap(cMap). WithTempRoot(p.helper.WorkDir()). - WithClusterctClient(cctlClient). + WithClusterctlClient(cctlClient). Build() return executorFactory(