mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Rename terraform to tofu in GoString method and docstrings (#576)
Signed-off-by: Dmitry Kisler <admin@dkisler.com>
This commit is contained in:
@@ -134,7 +134,7 @@ type PackageAuthenticationHashes interface {
|
||||
// hashes with different schemes, which means that all of them are equally
|
||||
// acceptable. Implementors may also return hashes that use schemes the
|
||||
// current version of the authenticator would not allow but that could be
|
||||
// accepted by other versions of Terraform, e.g. if a particular hash
|
||||
// accepted by other versions of OpenTofu, e.g. if a particular hash
|
||||
// scheme has been deprecated.
|
||||
//
|
||||
// Authenticators that don't use hashes as their authentication procedure
|
||||
@@ -202,11 +202,11 @@ type packageHashAuthentication struct {
|
||||
|
||||
// NewPackageHashAuthentication returns a PackageAuthentication implementation
|
||||
// that checks whether the contents of the package match whatever subset of the
|
||||
// given hashes are considered acceptable by the current version of Terraform.
|
||||
// given hashes are considered acceptable by the current version of OpenTofu.
|
||||
//
|
||||
// This uses the hash algorithms implemented by functions PackageHash and
|
||||
// MatchesHash. The PreferredHashes function will select which of the given
|
||||
// hashes are considered by Terraform to be the strongest verification, and
|
||||
// hashes are considered by OpenTofu to be the strongest verification, and
|
||||
// authentication succeeds as long as one of those matches.
|
||||
func NewPackageHashAuthentication(platform Platform, validHashes []Hash) PackageAuthentication {
|
||||
requiredHashes := PreferredHashes(validHashes)
|
||||
@@ -221,7 +221,7 @@ func (a packageHashAuthentication) AuthenticatePackage(localLocation PackageLoca
|
||||
if len(a.RequiredHashes) == 0 {
|
||||
// Indicates that none of the hashes given to
|
||||
// NewPackageHashAuthentication were considered to be usable by this
|
||||
// version of Terraform.
|
||||
// version of OpenTofu.
|
||||
return nil, fmt.Errorf("this version of OpenTofu does not support any of the checksum formats given for this provider")
|
||||
}
|
||||
|
||||
@@ -247,9 +247,9 @@ func (a packageHashAuthentication) AuthenticatePackage(localLocation PackageLoca
|
||||
}
|
||||
|
||||
func (a packageHashAuthentication) AcceptableHashes() []Hash {
|
||||
// In this case we include even hashes the current version of Terraform
|
||||
// In this case we include even hashes the current version of OpenTofu
|
||||
// doesn't prefer, because this result is used for building a lock file
|
||||
// and so it's helpful to include older hash formats that other Terraform
|
||||
// and so it's helpful to include older hash formats that other OpenTofu
|
||||
// versions might need in order to do authentication successfully.
|
||||
return a.AllHashes
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user