github.com/kevinklinger/open_terraform@v1.3.6/noninternal/depsfile/testing.go (about)

     1  package depsfile
     2  
     3  import (
     4  	"github.com/google/go-cmp/cmp"
     5  )
     6  
     7  // ProviderLockComparer is an option for github.com/google/go-cmp/cmp that
     8  // specifies how to compare values of type depsfile.ProviderLock.
     9  //
    10  // Use this, rather than crafting comparison options yourself, in case the
    11  // comparison strategy needs to change in future due to implementation details
    12  // of the ProviderLock type.
    13  var ProviderLockComparer cmp.Option
    14  
    15  func init() {
    16  	// For now, direct comparison of the unexported fields is good enough
    17  	// because we store everything in a normalized form. If that changes
    18  	// later then we might need to write a custom transformer to a hidden
    19  	// type with exported fields, so we can retain the ability for cmp to
    20  	// still report differences deeply.
    21  	ProviderLockComparer = cmp.AllowUnexported(ProviderLock{})
    22  }