(raw string)
| 308 | } |
| 309 | |
| 310 | func resolveChartType(raw string) (program.ChartType, error) { |
| 311 | normalized := strings.TrimSpace(raw) |
| 312 | if normalized == "" { |
| 313 | return program.ChartTypeLine, nil |
| 314 | } |
| 315 | switch normalized { |
| 316 | case string(program.ChartTypeLine): |
| 317 | return program.ChartTypeLine, nil |
| 318 | case string(program.ChartTypeArea): |
| 319 | return program.ChartTypeArea, nil |
| 320 | case string(program.ChartTypeStacked): |
| 321 | return program.ChartTypeStacked, nil |
| 322 | case string(program.ChartTypeHeatmap): |
| 323 | return program.ChartTypeHeatmap, nil |
| 324 | default: |
| 325 | return "", fmt.Errorf("invalid chart type %q", raw) |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | func compileLifecycle(in *charttpl.Lifecycle) program.LifecyclePolicy { |
| 330 | out := defaultChartLifecyclePolicyCopy() |
no test coverage detected
searching dependent graphs…