MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / SaveHost

Function SaveHost

apps/server/internal/config/config.go:164–174  ·  view source on GitHub ↗
(cfg Config)

Source from the content-addressed store, hash-verified

162}
163
164func SaveHost(cfg Config) error {
165 target := configFilePath()
166 if err := os.MkdirAll(filepath.Dir(target), 0o700); err != nil {
167 return err
168 }
169 out, err := json.MarshalIndent(cfg, "", " ")
170 if err != nil {
171 return err
172 }
173 return os.WriteFile(target, out, 0o600)
174}
175
176func LegacyVaultConfigPath(vaultRoot string) string {
177 return filepath.Join(vaultRoot, ".zennotes", "server.json")

Callers

nothing calls this directly

Calls 1

configFilePathFunction · 0.85

Tested by

no test coverage detected