Skip to content

Commit

Permalink
gofmt, vet
Browse files Browse the repository at this point in the history
  • Loading branch information
kmoe committed Jul 9, 2020
1 parent 0e83a3b commit ce2f18b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tfexec/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ type OutputMeta struct {
Value json.RawMessage `json:"value"`
}

func (tf *Terraform) Output(ctx context.Context, opts ...OutputOption) (map[string]OutputMeta, error) {
func (tf *Terraform) Output(ctx context.Context, opts ...OutputOption) (*map[string]OutputMeta, error) {
outputCmd := tf.OutputCmd(ctx, opts...)

var errBuf strings.Builder
Expand All @@ -551,12 +551,12 @@ func (tf *Terraform) Output(ctx context.Context, opts ...OutputOption) (map[stri
return nil, parseError(err.Error())
}

err = json.Unmarshal(outBuf.Bytes(), outputs)
err = json.Unmarshal(outBuf.Bytes(), &outputs)
if err != nil {
return nil, err
}

return outputs, nil
return &outputs, nil
}

func (tf *Terraform) StateShow(ctx context.Context) (*tfjson.State, error) {
Expand Down
2 changes: 1 addition & 1 deletion tfexec/terraform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func TestStateShow(t *testing.T) {
TerraformVersion: "0.12.24",
Values: &tfjson.StateValues{
RootModule: &tfjson.StateModule{
Resources: []*tfjson.StateResource{&tfjson.StateResource{
Resources: []*tfjson.StateResource{{
Address: "null_resource.foo",
AttributeValues: map[string]interface{}{
"id": "5510719323588825107",
Expand Down

0 comments on commit ce2f18b

Please sign in to comment.