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

Method Set

internal/editorconfig/toml_tool.go:95–113  ·  view source on GitHub ↗
(scope Scope, keyPath string, value any)

Source from the content-addressed store, hash-verified

93}
94
95func (c *tomlToolConfig) Set(scope Scope, keyPath string, value any) (string, error) {
96 parts, err := Parse(keyPath)
97 if err != nil {
98 return "", err
99 }
100 path := c.PathFor(scope)
101 if path == "" {
102 return "", fmt.Errorf("editorconfig: %s scope %s unsupported", c.spec.name, scope)
103 }
104 data, _, err := loadTOML(path)
105 if err != nil {
106 return "", err
107 }
108 Set(data, parts, value)
109 if err := writeTOML(path, data); err != nil {
110 return "", err
111 }
112 return path, nil
113}
114
115func (c *tomlToolConfig) Unset(scope Scope, keyPath string) (bool, string, error) {
116 parts, err := Parse(keyPath)

Callers

nothing calls this directly

Calls 5

PathForMethod · 0.95
ParseFunction · 0.85
loadTOMLFunction · 0.85
SetFunction · 0.85
writeTOMLFunction · 0.85

Tested by

no test coverage detected