Skip to content

Commit cf98250

Browse files
Merge pull request openshift#249 from wking/installer-error-capitalization
installer/pkg: Lowercase some capitalized error messages
2 parents b6a182a + fa35f19 commit cf98250

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

installer/pkg/config/parser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func ParseConfig(data []byte) (*Cluster, error) {
3434
if cluster.EC2AMIOverride == "" {
3535
ami, err := rhcos.AMI(DefaultChannel, cluster.AWS.Region)
3636
if err != nil {
37-
return nil, fmt.Errorf("Failed to determine default AMI: %v", err)
37+
return nil, fmt.Errorf("failed to determine default AMI: %v", err)
3838
}
3939
cluster.EC2AMIOverride = ami
4040
}

installer/pkg/workflow/executor.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import (
99
"runtime"
1010
)
1111

12-
// executor enables calling TerraForm from Go, across platforms, with any
12+
// executor enables calling Terraform from Go, across platforms, with any
1313
// additional providers/provisioners that the currently executing binary
1414
// exposes.
1515
//
16-
// The TerraForm binary is expected to be in the executing binary's folder, in
16+
// The Terraform binary is expected to be in the executing binary's folder, in
1717
// the current working directory or in the PATH.
1818
type executor struct {
1919
binaryPath string
@@ -25,17 +25,17 @@ const (
2525
tfBinWindows = "terraform.exe"
2626
)
2727

28-
// errBinaryNotFound denotes the fact that the TerraForm binary could not be
28+
// errBinaryNotFound denotes the fact that the Terraform binary could not be
2929
// found on disk.
3030
var errBinaryNotFound = errors.New(
31-
"TerraForm not in executable's folder, cwd nor PATH",
31+
"terraform not in executable's folder, cwd nor PATH",
3232
)
3333

3434
// newExecutor initializes a new Executor.
3535
func newExecutor() (*executor, error) {
3636
ex := new(executor)
3737

38-
// Find the TerraForm binary.
38+
// Find the Terraform binary.
3939
binPath, err := tfBinaryPath()
4040
if err != nil {
4141
return nil, err
@@ -45,13 +45,13 @@ func newExecutor() (*executor, error) {
4545
return ex, nil
4646
}
4747

48-
// Execute runs the given command and arguments against TerraForm.
48+
// Execute runs the given command and arguments against Terraform.
4949
//
50-
// An error is returned if the TerraForm binary could not be found, or if the
51-
// TerraForm call itself failed, in which case, details can be found in the
50+
// An error is returned if the Terraform binary could not be found, or if the
51+
// Terraform call itself failed, in which case, details can be found in the
5252
// output.
5353
func (ex *executor) execute(clusterDir string, args ...string) error {
54-
// Prepare TerraForm command by setting up the command, configuration,
54+
// Prepare Terraform command by setting up the command, configuration,
5555
// and the working directory
5656
if clusterDir == "" {
5757
return fmt.Errorf("clusterDir is unset. Quitting")
@@ -63,11 +63,11 @@ func (ex *executor) execute(clusterDir string, args ...string) error {
6363
cmd.Stderr = os.Stderr
6464
cmd.Dir = clusterDir
6565

66-
// Start TerraForm.
66+
// Start Terraform.
6767
return cmd.Run()
6868
}
6969

70-
// tfBinaryPath searches for a TerraForm binary on disk:
70+
// tfBinaryPath searches for a Terraform binary on disk:
7171
// - in the executing binary's folder,
7272
// - in the current working directory,
7373
// - in the PATH.

installer/pkg/workflow/terraform.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ func terraformExec(clusterDir string, args ...string) error {
1010
// Create an executor
1111
ex, err := newExecutor()
1212
if err != nil {
13-
return fmt.Errorf("Could not create Terraform executor: %s", err)
13+
return fmt.Errorf("could not create Terraform executor: %s", err)
1414
}
1515

1616
err = ex.execute(clusterDir, args...)
1717
if err != nil {
18-
return fmt.Errorf("Failed to run Terraform: %s", err)
18+
return fmt.Errorf("failed to run Terraform: %s", err)
1919
}
2020
return nil
2121
}

installer/pkg/workflow/utils.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func findStepTemplates(stepName string, platform config.Platform) (string, error
5353
func generateClusterConfigMaps(m *metadata) error {
5454
clusterGeneratedPath := filepath.Join(m.clusterDir, generatedPath)
5555
if err := os.MkdirAll(clusterGeneratedPath, os.ModeDir|0755); err != nil {
56-
return fmt.Errorf("Failed to create cluster generated directory at %s", clusterGeneratedPath)
56+
return fmt.Errorf("failed to create cluster generated directory at %s", clusterGeneratedPath)
5757
}
5858

5959
configGenerator := configgenerator.New(m.cluster)
@@ -75,7 +75,7 @@ func generateClusterConfigMaps(m *metadata) error {
7575

7676
kubePath := filepath.Join(m.clusterDir, kubeSystemPath)
7777
if err := os.MkdirAll(kubePath, os.ModeDir|0755); err != nil {
78-
return fmt.Errorf("Failed to create manifests directory at %s", kubePath)
78+
return fmt.Errorf("failed to create manifests directory at %s", kubePath)
7979
}
8080

8181
kubeSystemConfigFilePath := filepath.Join(kubePath, kubeSystemFileName)
@@ -90,7 +90,7 @@ func generateClusterConfigMaps(m *metadata) error {
9090

9191
tectonicPath := filepath.Join(m.clusterDir, tectonicSystemPath)
9292
if err := os.MkdirAll(tectonicPath, os.ModeDir|0755); err != nil {
93-
return fmt.Errorf("Failed to create tectonic directory at %s", tectonicPath)
93+
return fmt.Errorf("failed to create tectonic directory at %s", tectonicPath)
9494
}
9595

9696
tectonicSystemConfigFilePath := filepath.Join(tectonicPath, tectonicSystemFileName)

0 commit comments

Comments
 (0)