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)
| 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. |
| 20 | func 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. |