Skip to content

Commit

Permalink
Fix declared but not used compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
trodge committed Oct 6, 2022
1 parent 7a28b40 commit de33385
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mmv1/templates/terraform/resource.erb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func resource<%= resource_name -%><%= prop.name.camelize(:upper) -%>SetStyleDiff
<% end -%>

func resource<%= resource_name -%>Create(d *schema.ResourceData, meta interface{}) error {
<% if object.async&.is_a?(Api::OpAsync) && object.async.include_project -%>
<% if object.async&.is_a?(Api::OpAsync) && object.async.include_project && object.async&.allow?('create') -%>
var project string
<% end -%>
config := meta.(*Config)
Expand Down Expand Up @@ -577,7 +577,7 @@ func resource<%= resource_name -%>Read(d *schema.ResourceData, meta interface{})

<% if updatable?(object, object.root_properties) -%>
func resource<%= resource_name -%>Update(d *schema.ResourceData, meta interface{}) error {
<% if object.async&.is_a?(Api::OpAsync) && object.async.include_project -%>
<% if object.async&.is_a?(Api::OpAsync) && object.async.include_project && object.async&.allow?('update') -%>
var project string
<% end -%>
config := meta.(*Config)
Expand Down Expand Up @@ -839,7 +839,7 @@ if <%= props.map { |prop| "d.HasChange(\"#{prop.name.underscore}\")" }.join ' ||
<% end # if updatable? -%>
func resource<%= resource_name -%>Delete(d *schema.ResourceData, meta interface{}) error {
<% if object.async&.is_a?(Api::OpAsync) && object.async.include_project -%>
<% if object.async&.is_a?(Api::OpAsync) && object.async.include_project && object.async&.allow?('delete') -%>
var project string
<% end -%>
<% if object.skip_delete -%>
Expand Down

0 comments on commit de33385

Please sign in to comment.