terraform-provider-google/vendor/github.com/hashicorp/terraform/states/state_equal.go
Riley Karson dbf9188792
Vendor 0.12 SDK (#3432)
```bash
GO111MODULE=on go get github.com/hashicorp/terraform@pluginsdk-v0.12-early7
GO111MODULE=on go mod vendor
GO111MODULE=on go mod tidy
```
2019-04-15 13:39:47 -07:00

19 lines
606 B
Go

package states
import (
"reflect"
)
// Equal returns true if the receiver is functionally equivalent to other,
// including any ephemeral portions of the state that would not be included
// if the state were saved to files.
//
// To test only the persistent portions of two states for equality, instead
// use statefile.StatesMarshalEqual.
func (s *State) Equal(other *State) bool {
// For the moment this is sufficient, but we may need to do something
// more elaborate in future if we have any portions of state that require
// more sophisticated comparisons.
return reflect.DeepEqual(s, other)
}