()
| 82 | } |
| 83 | |
| 84 | func (c *jsonToolConfig) LoadAll() map[string]ScopedConfig { |
| 85 | all := map[string]ScopedConfig{} |
| 86 | for _, scope := range []Scope{UserScope, ProjectScope} { |
| 87 | path := c.PathFor(scope) |
| 88 | if path == "" { |
| 89 | continue |
| 90 | } |
| 91 | data, _, err := loadJSON(path) |
| 92 | if err != nil { |
| 93 | continue |
| 94 | } |
| 95 | all[string(scope)] = ScopedConfig{Data: data, Path: path} |
| 96 | } |
| 97 | return all |
| 98 | } |
| 99 | |
| 100 | func (c *jsonToolConfig) Set(scope Scope, keyPath string, value any) (string, error) { |
| 101 | parts, err := Parse(keyPath) |