Skip to content

Commit

Permalink
gofmt, vet
Browse files Browse the repository at this point in the history
  • Loading branch information
kmoe committed Jul 6, 2020
1 parent 6ceffae commit ea05703
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tfexec/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,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 @@ -539,12 +539,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 Expand Up @@ -592,7 +592,7 @@ func (tf *Terraform) ProvidersSchema(ctx context.Context) (*tfjson.ProviderSchem
return nil, parseError(errBuf.String())
}

err = json.Unmarshal(outBuf.Bytes(), ret)
err = json.Unmarshal(outBuf.Bytes(), &ret)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion tfexec/terraform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,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 ea05703

Please sign in to comment.