MCPcopy Create free account
hub / github.com/LunaSource/Luna / SaveGlobalConfig

Function SaveGlobalConfig

config/loader.go:62–69  ·  view source on GitHub ↗
(cfg Config)

Source from the content-addressed store, hash-verified

60}
61
62func SaveGlobalConfig(cfg Config) error {
63 path, err := getGlobalConfigPath()
64 if err != nil {
65 return err
66 }
67 data, _ := json.MarshalIndent(cfg, "", " ")
68 return ioutil.WriteFile(path, data, 0644)
69}
70
71func SaveProjectConfig(cfg Config) error {
72 path := filepath.Join(".", PROJECT_CONFIG_FILE)

Callers 3

SaveGlobalApiKeyFunction · 0.85
initConfigInteractiveFunction · 0.85
createGlobalConfigFunction · 0.85

Calls 1

getGlobalConfigPathFunction · 0.85

Tested by

no test coverage detected