Skip to content

Commit 9223a77

Browse files
committed
rename executor methods to remove get
Signed-off-by: Spike Curtis <spike@coder.com>
1 parent 878376e commit 9223a77

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

provisioner/terraform/executor.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (e executor) execParseJSON(ctx context.Context, args, env []string, v inter
8585
}
8686

8787
func (e executor) checkMinVersion(ctx context.Context) error {
88-
v, err := e.getVersion(ctx)
88+
v, err := e.version(ctx)
8989
if err != nil {
9090
return err
9191
}
@@ -98,7 +98,7 @@ func (e executor) checkMinVersion(ctx context.Context) error {
9898
return nil
9999
}
100100

101-
func (e executor) getVersion(ctx context.Context) (*version.Version, error) {
101+
func (e executor) version(ctx context.Context) (*version.Version, error) {
102102
// #nosec
103103
cmd := exec.CommandContext(ctx, e.binaryPath, "version", "-json")
104104
out, err := cmd.Output()
@@ -234,7 +234,7 @@ func (e executor) apply(ctx context.Context, env, vars []string, logger provisio
234234
}
235235

236236
func (e executor) stateResources(ctx context.Context) ([]*proto.Resource, error) {
237-
state, err := e.getState(ctx)
237+
state, err := e.state(ctx)
238238
if err != nil {
239239
return nil, err
240240
}
@@ -252,12 +252,12 @@ func (e executor) stateResources(ctx context.Context) ([]*proto.Resource, error)
252252
return resources, nil
253253
}
254254

255-
func (e executor) getState(ctx context.Context) (*tfjson.State, error) {
255+
func (e executor) state(ctx context.Context) (*tfjson.State, error) {
256256
args := []string{"show", "-json"}
257257
state := &tfjson.State{}
258258
err := e.execParseJSON(ctx, args, e.basicEnv(), state)
259259
if err != nil {
260-
return nil, xerrors.Errorf("get terraform state: %w", err)
260+
return nil, xerrors.Errorf("terraform show state: %w", err)
261261
}
262262
return state, nil
263263
}

0 commit comments

Comments
 (0)