@@ -9,11 +9,11 @@ import (
9
9
"runtime"
10
10
)
11
11
12
- // executor enables calling TerraForm from Go, across platforms, with any
12
+ // executor enables calling Terraform from Go, across platforms, with any
13
13
// additional providers/provisioners that the currently executing binary
14
14
// exposes.
15
15
//
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
17
17
// the current working directory or in the PATH.
18
18
type executor struct {
19
19
binaryPath string
@@ -25,17 +25,17 @@ const (
25
25
tfBinWindows = "terraform.exe"
26
26
)
27
27
28
- // errBinaryNotFound denotes the fact that the TerraForm binary could not be
28
+ // errBinaryNotFound denotes the fact that the Terraform binary could not be
29
29
// found on disk.
30
30
var errBinaryNotFound = errors .New (
31
- "TerraForm not in executable's folder, cwd nor PATH" ,
31
+ "terraform not in executable's folder, cwd nor PATH" ,
32
32
)
33
33
34
34
// newExecutor initializes a new Executor.
35
35
func newExecutor () (* executor , error ) {
36
36
ex := new (executor )
37
37
38
- // Find the TerraForm binary.
38
+ // Find the Terraform binary.
39
39
binPath , err := tfBinaryPath ()
40
40
if err != nil {
41
41
return nil , err
@@ -45,13 +45,13 @@ func newExecutor() (*executor, error) {
45
45
return ex , nil
46
46
}
47
47
48
- // Execute runs the given command and arguments against TerraForm .
48
+ // Execute runs the given command and arguments against Terraform .
49
49
//
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
52
52
// output.
53
53
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,
55
55
// and the working directory
56
56
if clusterDir == "" {
57
57
return fmt .Errorf ("clusterDir is unset. Quitting" )
@@ -63,11 +63,11 @@ func (ex *executor) execute(clusterDir string, args ...string) error {
63
63
cmd .Stderr = os .Stderr
64
64
cmd .Dir = clusterDir
65
65
66
- // Start TerraForm .
66
+ // Start Terraform .
67
67
return cmd .Run ()
68
68
}
69
69
70
- // tfBinaryPath searches for a TerraForm binary on disk:
70
+ // tfBinaryPath searches for a Terraform binary on disk:
71
71
// - in the executing binary's folder,
72
72
// - in the current working directory,
73
73
// - in the PATH.
0 commit comments