MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / legacyApplyValue

Function legacyApplyValue

internal/cli/config_cmd.go:338–349  ·  view source on GitHub ↗

legacyApplyValue is the real implementation used by the legacy `set` path. It is kept separate from legacyUnsetConfig so the `set` and `unset` flows can evolve independently without sharing a boolean toggle.

(path, key, value string)

Source from the content-addressed store, hash-verified

336// It is kept separate from legacyUnsetConfig so the `set` and `unset` flows
337// can evolve independently without sharing a boolean toggle.
338func legacyApplyValue(path, key, value string) error {
339 cfg, err := loadConfigFile(path)
340 if err != nil {
341 return err
342 }
343 parts, err := editorconfig.Parse(key)
344 if err != nil {
345 return err
346 }
347 editorconfig.Set(cfg, parts, editorconfig.ParseScalar(value))
348 return writeConfigFile(path, cfg)
349}

Callers 1

configSetCommandMethod · 0.85

Calls 5

ParseFunction · 0.92
SetFunction · 0.92
ParseScalarFunction · 0.92
loadConfigFileFunction · 0.85
writeConfigFileFunction · 0.70

Tested by

no test coverage detected