opentofu/internal/cloud/configchangemode_string.go
Martin Atkins e5172fea95 cloud: DetectConfigChangeType helper
This aims to encapsulate the somewhat-weird logic we currently use to
distinguish between the various "terraform init" situations involving
Terraform Cloud mode, in the hope of making codepaths that branch based
on this slightly easier to read.

This isn't yet used, but uses of it will follow in subsequent commits.
2021-11-17 14:20:44 -08:00

38 lines
974 B
Go

// Code generated by "stringer -type ConfigChangeMode"; DO NOT EDIT.
package cloud
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[ConfigMigrationIn-8600]
_ = x[ConfigMigrationOut-8598]
_ = x[ConfigChangeInPlace-8635]
_ = x[ConfigChangeIrrelevant-129335]
}
const (
_ConfigChangeMode_name_0 = "ConfigMigrationOut"
_ConfigChangeMode_name_1 = "ConfigMigrationIn"
_ConfigChangeMode_name_2 = "ConfigChangeInPlace"
_ConfigChangeMode_name_3 = "ConfigChangeIrrelevant"
)
func (i ConfigChangeMode) String() string {
switch {
case i == 8598:
return _ConfigChangeMode_name_0
case i == 8600:
return _ConfigChangeMode_name_1
case i == 8635:
return _ConfigChangeMode_name_2
case i == 129335:
return _ConfigChangeMode_name_3
default:
return "ConfigChangeMode(" + strconv.FormatInt(int64(i), 10) + ")"
}
}