addrs: ModuleInstanceStep.String
When ModuleInstanceStep values appear alone in debug messages, it's easier to read them in a compact, HCL-like form than as the default struct printing style.
This commit is contained in:
parent
678760b61a
commit
9f727b5799
|
@ -413,3 +413,10 @@ func (m ModuleInstance) TargetContains(other Targetable) bool {
|
||||||
func (m ModuleInstance) targetableSigil() {
|
func (m ModuleInstance) targetableSigil() {
|
||||||
// ModuleInstance is targetable
|
// ModuleInstance is targetable
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s ModuleInstanceStep) String() string {
|
||||||
|
if s.InstanceKey != NoKey {
|
||||||
|
return s.Name + s.InstanceKey.String()
|
||||||
|
}
|
||||||
|
return s.Name
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue