From 591dcced22e897dd256107145a6330e1916cc004 Mon Sep 17 00:00:00 2001 From: sophia Date: Wed, 25 Aug 2021 16:00:20 -0500 Subject: [PATCH] Remotve machine names function from project --- builtin/myplugin/command/info.go | 2 +- builtin/otherplugin/command.go | 2 +- internal/core/project.go | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/builtin/myplugin/command/info.go b/builtin/myplugin/command/info.go index 7fb2d4e57..86e6865ec 100644 --- a/builtin/myplugin/command/info.go +++ b/builtin/myplugin/command/info.go @@ -68,7 +68,7 @@ func (c *Info) Flags() []*option.Option { } func (c *Info) Execute(trm terminal.UI, p plugincore.Project) int32 { - mn, _ := p.MachineNames() + mn, _ := p.TargetNames() trm.Output("\nMachines in this project") trm.Output(strings.Join(mn[:], "\n")) diff --git a/builtin/otherplugin/command.go b/builtin/otherplugin/command.go index 62cc80d90..ba348246f 100644 --- a/builtin/otherplugin/command.go +++ b/builtin/otherplugin/command.go @@ -105,7 +105,7 @@ func (c *Command) ExecuteThing(trm terminal.UI, flags map[string]interface{}) in } func (c *Command) ExecuteInfo(trm terminal.UI, p plugincore.Project) int32 { - mn, _ := p.MachineNames() + mn, _ := p.TargetNames() trm.Output("\nMachines in this project") trm.Output(strings.Join(mn[:], "\n")) diff --git a/internal/core/project.go b/internal/core/project.go index c5efce3ff..a5e392079 100644 --- a/internal/core/project.go +++ b/internal/core/project.go @@ -122,12 +122,6 @@ func (p *Project) TargetIndex() (index core.TargetIndex, err error) { return p.basis.TargetIndex() } -// MachineNames implements core.Project -func (p *Project) MachineNames() (names []string, err error) { - // TODO: remove in favor or TargetNames()? - return []string{"test"}, nil -} - // Target implements core.Project func (p *Project) Target(nameOrId string) (core.Target, error) { if t, ok := p.targets[nameOrId]; ok {