(cfg Config)
| 162 | } |
| 163 | |
| 164 | func 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 | |
| 176 | func LegacyVaultConfigPath(vaultRoot string) string { |
| 177 | return filepath.Join(vaultRoot, ".zennotes", "server.json") |
nothing calls this directly
no test coverage detected