mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
22eee529e3
We previously built out addrs.UnifyMoveEndpoints with a different implementation strategy in mind, but that design turns out to not be viable because it forces us to move to AbsMoveable addresses too soon, before we've done the analysis required to identify chained and nested moves. Instead, UnifyMoveEndpoints will return a new type MoveEndpointInModule which conceptually represents a matching pattern which either matches or doesn't match a particular AbsMoveable. It does this by just binding the unified relative address from the MoveEndpoint to the module where it was declared, and thus allows us to distinguish between the part of the module path which applies to any instances of the given modules vs. the user-specified part which must identify particular module instances.
30 lines
694 B
Go
30 lines
694 B
Go
// Code generated by "stringer -type MoveEndpointKind"; DO NOT EDIT.
|
|
|
|
package addrs
|
|
|
|
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[MoveEndpointModule-77]
|
|
_ = x[MoveEndpointResource-82]
|
|
}
|
|
|
|
const (
|
|
_MoveEndpointKind_name_0 = "MoveEndpointModule"
|
|
_MoveEndpointKind_name_1 = "MoveEndpointResource"
|
|
)
|
|
|
|
func (i MoveEndpointKind) String() string {
|
|
switch {
|
|
case i == 77:
|
|
return _MoveEndpointKind_name_0
|
|
case i == 82:
|
|
return _MoveEndpointKind_name_1
|
|
default:
|
|
return "MoveEndpointKind(" + strconv.FormatInt(int64(i), 10) + ")"
|
|
}
|
|
}
|