import (
"context"
"fmt"
cconf "github.com/pip-services4/pip-services4-go/pip-services4-components-go/config"
refer "github.com/pip-services4/pip-services4-go/pip-services4-components-go/refer"
run "github.com/pip-services4/pip-services4-go/pip-services4-components-go/run"
)
type MyComponentB struct {
// ...
}
type MyComponentA struct {
cconf.IConfigurable
refer.IReferenceable
refer.IUnreferenceable
run.IOpenable
param1 string
param2 int
open bool
anotherComponent interface{}
dummyVariable string
status string
}
// ...
// Unsets (clears) previously set references to dependent components.
func (c *MyComponentA) UnsetReferences(ctx context.Context) {
c.anotherComponent = nil
c.status = "Un-referenced"
fmt.Println("References cleared")
}