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

Method runE

internal/cmdexport/cmdexport.go:112–132  ·  view source on GitHub ↗

runE generates the pipeline and writes it into a file or stdout.

(c *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

110
111// runE generates the pipeline and writes it into a file or stdout.
112func (r *ExportRunner) runE(c *cobra.Command, args []string) error {
113 pipeline, e := r.Pipeline.Init(r.PipelineConfig).Generate()
114
115 if e != nil {
116 return e
117 }
118
119 if r.OutputFilePath != "" {
120 fo, err := os.Create(r.OutputFilePath)
121
122 if err != nil {
123 return err
124 }
125
126 c.SetOut(fo)
127 }
128
129 _, err := c.OutOrStdout().Write(pipeline)
130
131 return err
132}
133
134func supportedOrchestrators() map[string]orchestrators.Pipeline {
135 return map[string]orchestrators.Pipeline{

Callers

nothing calls this directly

Calls 2

GenerateMethod · 0.65
InitMethod · 0.65

Tested by

no test coverage detected