(out io.Writer)
| 95 | } |
| 96 | |
| 97 | func (o *createOptions) run(out io.Writer) error { |
| 98 | fmt.Fprintf(out, "Creating %s\n", o.name) |
| 99 | |
| 100 | switch o.chartAPIVersion { |
| 101 | case chart.APIVersionV2, "": |
| 102 | return o.createV2Chart(out) |
| 103 | case chartv3.APIVersionV3: |
| 104 | if !gates.ChartV3.IsEnabled() { |
| 105 | return gates.ChartV3.Error() |
| 106 | } |
| 107 | return o.createV3Chart(out) |
| 108 | default: |
| 109 | return fmt.Errorf("unsupported chart API version: %s (supported: v2, v3)", o.chartAPIVersion) |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | func (o *createOptions) createV2Chart(out io.Writer) error { |
| 114 | chartname := filepath.Base(o.name) |
no test coverage detected