diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-22 20:53:09 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-22 20:53:09 +0200 |
| commit | 9df83b738cd6731c5d7171dc0f4de6bb99871029 (patch) | |
| tree | feb1d82ed0b563d9125ea901b7004afd67f18e78 /internal/config | |
| parent | 7de95e396d729895a7e1e27c1155c9d365fab41c (diff) | |
Replace all geheim path/name defaults with foostore
- Default data_dir: ~/git/geheimlager → ~/git/foostore-data
- Default export_dir: ~/.geheimlagerexport → ~/.foostore-export
- Default key_file: ~/.geheimlager.key → ~/.foostore.key
- Rename env var GEHEIM_SHELL → FOOSTORE_SHELL
- Update package-level comments across cli, shell, store, git, config
- Update Magefile and CLAUDE.md docs to reflect new paths
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 12 | ||||
| -rw-r--r-- | internal/config/config_test.go | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 04c8302..2f7871e 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -1,6 +1,6 @@ -// Package config handles loading and storing geheim configuration. +// Package config handles loading and storing foostore configuration. // Defaults mirror the Ruby reference (geheim.rb Config::DEFAULTS). -// A JSON file at ~/.config/geheim.json overrides individual fields; +// A JSON file at ~/.config/foostore.json overrides individual fields; // missing fields keep their default values because Go's json.Unmarshal // only touches fields that are present in the JSON document. package config @@ -17,7 +17,7 @@ import ( const configPath = "~/.config/foostore.json" // Config holds all application-wide configuration values. -// JSON field names use snake_case to match geheim.rb Config::DEFAULTS keys. +// JSON field names use snake_case to match the original geheim.rb Config::DEFAULTS keys. type Config struct { DataDir string `json:"data_dir"` ExportDir string `json:"export_dir"` @@ -46,9 +46,9 @@ func defaultConfig() Config { } return Config{ - DataDir: filepath.Join(home, "git", "geheimlager"), - ExportDir: filepath.Join(home, ".geheimlagerexport"), - KeyFile: filepath.Join(home, ".geheimlager.key"), + DataDir: filepath.Join(home, "git", "foostore-data"), + ExportDir: filepath.Join(home, ".foostore-export"), + KeyFile: filepath.Join(home, ".foostore.key"), KeyLength: 32, EncAlg: "AES-256-CBC", AddToIV: "Hello world", diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 715a09e..4ad8312 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -78,9 +78,9 @@ func TestLoad_defaults(t *testing.T) { cfg := Load() cases := []struct{ name, got, want string }{ - {"DataDir", cfg.DataDir, filepath.Join(dir, "git", "geheimlager")}, - {"ExportDir", cfg.ExportDir, filepath.Join(dir, ".geheimlagerexport")}, - {"KeyFile", cfg.KeyFile, filepath.Join(dir, ".geheimlager.key")}, + {"DataDir", cfg.DataDir, filepath.Join(dir, "git", "foostore-data")}, + {"ExportDir", cfg.ExportDir, filepath.Join(dir, ".foostore-export")}, + {"KeyFile", cfg.KeyFile, filepath.Join(dir, ".foostore.key")}, {"EncAlg", cfg.EncAlg, "AES-256-CBC"}, {"AddToIV", cfg.AddToIV, "Hello world"}, {"EditCmd", cfg.EditCmd, "vi"}, @@ -145,7 +145,7 @@ func TestLoad_override(t *testing.T) { if cfg.EncAlg != "AES-256-CBC" { t.Errorf("EncAlg = %q; want AES-256-CBC", cfg.EncAlg) } - if cfg.DataDir != filepath.Join(dir, "git", "geheimlager") { + if cfg.DataDir != filepath.Join(dir, "git", "foostore-data") { t.Errorf("DataDir = %q; want default", cfg.DataDir) } } |
