(path []string)
| 1606 | } |
| 1607 | |
| 1608 | func classifyConfigSetLifecycle(path []string) (configMutationLifecycle, error) { |
| 1609 | field := strings.Join(path, ".") |
| 1610 | section := settingsSectionForConfigMutation(path) |
| 1611 | if section == "" { |
| 1612 | return restartRequiredConfigLifecycle(), nil |
| 1613 | } |
| 1614 | classification, err := settingspkg.ClassifyMutation(settingspkg.MutationDescriptor{ |
| 1615 | Section: section, |
| 1616 | ChangedFields: []string{field}, |
| 1617 | }) |
| 1618 | if err != nil { |
| 1619 | return configMutationLifecycle{}, fmt.Errorf( |
| 1620 | "cli: classify lifecycle for config path %q: %w", |
| 1621 | field, |
| 1622 | err, |
| 1623 | ) |
| 1624 | } |
| 1625 | return configLifecycleFromSettings(classification), nil |
| 1626 | } |
| 1627 | |
| 1628 | func settingsSectionForConfigMutation(path []string) settingspkg.SectionName { |
| 1629 | if len(path) == 0 { |
no test coverage detected