(raw string)
| 1564 | } |
| 1565 | |
| 1566 | func parseDottedConfigPath(raw string) ([]string, error) { |
| 1567 | trimmed := strings.TrimSpace(raw) |
| 1568 | if trimmed == "" { |
| 1569 | return nil, errors.New("cli: config path is required") |
| 1570 | } |
| 1571 | if strings.ContainsAny(trimmed, "[]") { |
| 1572 | return nil, fmt.Errorf("cli: config set does not support array paths: %q", trimmed) |
| 1573 | } |
| 1574 | parts := strings.Split(trimmed, ".") |
| 1575 | for _, part := range parts { |
| 1576 | if strings.TrimSpace(part) == "" { |
| 1577 | return nil, fmt.Errorf("cli: config path %q contains an empty segment", trimmed) |
| 1578 | } |
| 1579 | } |
| 1580 | return parts, nil |
| 1581 | } |
| 1582 | |
| 1583 | func classifyConfigMutationPath(path []string) (configSetValueKind, bool, error) { |
| 1584 | joined := strings.Join(path, ".") |
no outgoing calls
no test coverage detected