style: ran go fmt
This commit is contained in:
parent
d918d775f3
commit
562a793430
|
@ -1,4 +1,5 @@
|
||||||
package terraform
|
package terraform
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hashicorp/terraform/config"
|
"github.com/hashicorp/terraform/config"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -9,7 +10,7 @@ import (
|
||||||
// IgnoreChanges lifecycle.
|
// IgnoreChanges lifecycle.
|
||||||
type EvalIgnoreChanges struct {
|
type EvalIgnoreChanges struct {
|
||||||
Resource *config.Resource
|
Resource *config.Resource
|
||||||
Diff **InstanceDiff
|
Diff **InstanceDiff
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *EvalIgnoreChanges) Eval(ctx EvalContext) (interface{}, error) {
|
func (n *EvalIgnoreChanges) Eval(ctx EvalContext) (interface{}, error) {
|
||||||
|
@ -20,7 +21,7 @@ func (n *EvalIgnoreChanges) Eval(ctx EvalContext) (interface{}, error) {
|
||||||
diff := *n.Diff
|
diff := *n.Diff
|
||||||
ignoreChanges := n.Resource.Lifecycle.IgnoreChanges
|
ignoreChanges := n.Resource.Lifecycle.IgnoreChanges
|
||||||
|
|
||||||
for _, ignoredName := range ignoreChanges {
|
for _, ignoredName := range ignoreChanges {
|
||||||
for name := range diff.Attributes {
|
for name := range diff.Attributes {
|
||||||
if strings.HasPrefix(name, ignoredName) {
|
if strings.HasPrefix(name, ignoredName) {
|
||||||
delete(diff.Attributes, name)
|
delete(diff.Attributes, name)
|
||||||
|
|
|
@ -320,7 +320,7 @@ func (n *graphNodeExpandedResource) EvalTree() EvalNode {
|
||||||
},
|
},
|
||||||
&EvalIgnoreChanges{
|
&EvalIgnoreChanges{
|
||||||
Resource: n.Resource,
|
Resource: n.Resource,
|
||||||
Diff: &diff,
|
Diff: &diff,
|
||||||
},
|
},
|
||||||
&EvalWriteState{
|
&EvalWriteState{
|
||||||
Name: n.stateId(),
|
Name: n.stateId(),
|
||||||
|
|
Loading…
Reference in New Issue