Update parents -> parent

This commit is contained in:
sophia 2021-10-20 12:20:20 -05:00 committed by Paul Hinze
parent 327db98656
commit f1f1b8c79d
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
4 changed files with 13 additions and 13 deletions

View File

@ -33,13 +33,13 @@ func (h *AlwaysTrueHost) Detect() bool {
return true
}
// ParentsFunc implements component.Host
func (h *AlwaysTrueHost) ParentsFunc() interface{} {
return h.Parents
// ParentFunc implements component.Host
func (h *AlwaysTrueHost) ParentFunc() interface{} {
return h.Parent
}
func (h *AlwaysTrueHost) Parents() []string {
return []string{}
func (h *AlwaysTrueHost) Parent() string {
return ""
}
// HasCapabilityFunc implements component.Host

View File

@ -41,12 +41,12 @@ func (h *AlwaysTrueGuest) Detect(t plugincore.Target) bool {
}
// ParentsFunc implements component.Guest
func (h *AlwaysTrueGuest) ParentsFunc() interface{} {
return h.Parents
func (h *AlwaysTrueGuest) ParentFunc() interface{} {
return h.Parent
}
func (h *AlwaysTrueGuest) Parents() []string {
return []string{"force", "guest", "platform", "match"} // We just need to have this be the most of all matches
func (h *AlwaysTrueGuest) Parent() string {
return ""
}
// HasCapabilityFunc implements component.Guest

View File

@ -226,7 +226,7 @@ func (b *Basis) Host() (host core.Host, err error) {
}
if detected {
hp, err := host.Parents()
hp, err := host.Parent()
if err != nil {
b.logger.Error("failed to get parents from host",
"plugin", name,
@ -236,7 +236,7 @@ func (b *Basis) Host() (host core.Host, err error) {
continue
}
rp, err := result.Parents()
rp, err := result.Parent()
if err != nil {
b.logger.Error("failed to get parents from host",
"plugin", result_name,

View File

@ -70,7 +70,7 @@ func (m *Machine) Guest() (g core.Guest, err error) {
continue
}
gp, err := guest.Parents()
gp, err := guest.Parent()
if err != nil {
m.logger.Error("failed to get parents from guest",
"plugin", name,
@ -80,7 +80,7 @@ func (m *Machine) Guest() (g core.Guest, err error) {
continue
}
rp, err := result.Parents()
rp, err := result.Parent()
if err != nil {
m.logger.Error("failed to get parents from guest",
"plugin", result_name,