MCPcopy Create free account
hub / github.com/compozy/agh / parseDottedConfigPath

Function parseDottedConfigPath

internal/cli/config.go:1566–1581  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

1564}
1565
1566func 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
1583func classifyConfigMutationPath(path []string) (configSetValueKind, bool, error) {
1584 joined := strings.Join(path, ".")

Callers 1

configMutationPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected