use the full provider name for CloseProvider
CloseProviderTransformer wasn't using the full provider when creating the graph node, so the Close wasn't actually being called on the provider.
This commit is contained in:
parent
ba749db9ed
commit
6210b1749b
|
@ -138,13 +138,13 @@ func (t *CloseProviderTransformer) Transform(g *Graph) error {
|
||||||
p := v.(GraphNodeProvider)
|
p := v.(GraphNodeProvider)
|
||||||
|
|
||||||
// get the close provider of this type if we alread created it
|
// get the close provider of this type if we alread created it
|
||||||
closer := cpm[p.ProviderName()]
|
closer := cpm[p.Name()]
|
||||||
|
|
||||||
if closer == nil {
|
if closer == nil {
|
||||||
// create a closer for this provider type
|
// create a closer for this provider type
|
||||||
closer = &graphNodeCloseProvider{ProviderNameValue: p.ProviderName()}
|
closer = &graphNodeCloseProvider{ProviderNameValue: p.Name()}
|
||||||
g.Add(closer)
|
g.Add(closer)
|
||||||
cpm[p.ProviderName()] = closer
|
cpm[p.Name()] = closer
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close node depends on the provider itself
|
// Close node depends on the provider itself
|
||||||
|
@ -336,7 +336,7 @@ type graphNodeCloseProvider struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *graphNodeCloseProvider) Name() string {
|
func (n *graphNodeCloseProvider) Name() string {
|
||||||
return fmt.Sprintf("provider.%s (close)", n.ProviderNameValue)
|
return n.ProviderNameValue + " (close)"
|
||||||
}
|
}
|
||||||
|
|
||||||
// GraphNodeEvalable impl.
|
// GraphNodeEvalable impl.
|
||||||
|
|
Loading…
Reference in New Issue