fix reference transformer comments

GraphNodeSubPath/GraphNodeModuleInstance is not required for references
This commit is contained in:
James Bardin 2020-03-06 22:31:16 -05:00
parent ab9a2935ce
commit 245296850b
1 changed files with 3 additions and 3 deletions

View File

@ -293,7 +293,7 @@ func (m *ReferenceMap) mapKey(path addrs.Module, addr addrs.Referenceable) strin
// referenced. This is the path that its results from ReferenceableAddrs
// are considered to be relative to.
//
// Only GraphNodeModuleInstance implementations can be referenced, so this method will
// Only GraphNodeModulePath implementations can be referenced, so this method will
// panic if the given vertex does not implement that interface.
func vertexReferenceablePath(v dag.Vertex) addrs.Module {
sp, ok := v.(GraphNodeModulePath)
@ -316,7 +316,7 @@ func vertexReferenceablePath(v dag.Vertex) addrs.Module {
// vertexReferencePath returns the path in which references _from_ the given
// vertex must be interpreted.
//
// Only GraphNodeModuleInstance implementations can have references, so this method
// Only GraphNodeModulePath implementations can have references, so this method
// will panic if the given vertex does not implement that interface.
func vertexReferencePath(v dag.Vertex) addrs.Module {
sp, ok := v.(GraphNodeModulePath)
@ -344,7 +344,7 @@ func vertexReferencePath(v dag.Vertex) addrs.Module {
// The result is an opaque string that includes both the address of the given
// object and the address of the module instance that object belongs to.
//
// Only GraphNodeModuleInstance implementations can be referrers, so this method will
// Only GraphNodeModulePath implementations can be referrers, so this method will
// panic if the given vertex does not implement that interface.
func (m *ReferenceMap) referenceMapKey(referrer dag.Vertex, addr addrs.Referenceable) string {
path := vertexReferencePath(referrer)