MCPcopy
hub / github.com/kptdev/kpt / GetDestroyRunner

Function GetDestroyRunner

commands/destroycmd.go:20–29  ·  view source on GitHub ↗

GetDestroyRunner returns a wrapper around the cli-utils destroy command DestroyRunner. Sets up the Run on this wrapped runner to be the DestroyRunnerWrapper run.

(provider provider.Provider, loader manifestreader.ManifestLoader, ioStreams genericclioptions.IOStreams)

Source from the content-addressed store, hash-verified

18// GetDestroyRunner returns a wrapper around the cli-utils destroy command DestroyRunner. Sets
19// up the Run on this wrapped runner to be the DestroyRunnerWrapper run.
20func GetDestroyRunner(provider provider.Provider, loader manifestreader.ManifestLoader, ioStreams genericclioptions.IOStreams) *DestroyRunnerWrapper {
21 destroyRunner := destroy.GetDestroyRunner(provider, loader, ioStreams)
22 w := &DestroyRunnerWrapper{
23 destroyRunner: destroyRunner,
24 provider: provider,
25 }
26 // Set the wrapper run to be the RunE function for the wrapped command.
27 destroyRunner.Command.RunE = w.RunE
28 return w
29}
30
31// DestroyRunnerWrapper encapsulates the cli-utils destroy command DestroyRunner as well
32// as structures necessary to run.

Callers 1

GetLiveCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected