aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/states/state_equal.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/states/state_equal.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/states/state_equal.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/states/state_equal.go b/vendor/github.com/hashicorp/terraform/states/state_equal.go
new file mode 100644
index 0000000..ea20967
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform/states/state_equal.go
@@ -0,0 +1,18 @@
1package states
2
3import (
4 "reflect"
5)
6
7// Equal returns true if the receiver is functionally equivalent to other,
8// including any ephemeral portions of the state that would not be included
9// if the state were saved to files.
10//
11// To test only the persistent portions of two states for equality, instead
12// use statefile.StatesMarshalEqual.
13func (s *State) Equal(other *State) bool {
14 // For the moment this is sufficient, but we may need to do something
15 // more elaborate in future if we have any portions of state that require
16 // more sophisticated comparisons.
17 return reflect.DeepEqual(s, other)
18}