MCPcopy Index your code
hub / github.com/cloudfoundry/cli / SetDependency

Method SetDependency

cf/commands/plugin/uninstall_plugin.go:50–66  ·  view source on GitHub ↗
(deps commandregistry.Dependency, pluginCall bool)

Source from the content-addressed store, hash-verified

48}
49
50func (cmd *PluginUninstall) SetDependency(deps commandregistry.Dependency, pluginCall bool) commandregistry.Command {
51 cmd.ui = deps.UI
52 cmd.config = deps.PluginConfig
53
54 // reset rpc registration in case there is other running instance,
55 // each service can only be registered once
56 server := rpc.NewServer()
57
58 RPCService, err := rpcService.NewRpcService(deps.TeePrinter, deps.TeePrinter, deps.Config, deps.RepoLocator, rpcService.NewCommandRunner(), deps.Logger, cmd.ui.Writer(), server)
59 if err != nil {
60 cmd.ui.Failed("Error initializing RPC service: " + err.Error())
61 }
62
63 cmd.rpcService = RPCService
64
65 return cmd
66}
67
68func (cmd *PluginUninstall) Execute(c flags.FlagContext) error {
69 pluginName := c.Args()[0]

Callers

nothing calls this directly

Calls 3

WriterMethod · 0.65
FailedMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected