diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-22 19:17:57 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-22 19:17:57 +0200 |
| commit | d629558394465b8956285edac324d67688ddd2c1 (patch) | |
| tree | f511cf1ea87d916c11e85243361c366ae9843cd4 /internal/config | |
| parent | 48280e828bc4737a91ed556226f7fdcb52679f87 (diff) | |
Rename binary from geheim to foostore
- go.mod: module path codeberg.org/snonux/geheim → codeberg.org/snonux/foostore
- cmd/geheim/ → cmd/foostore/
- Magefile.go: binary/binaryName/mainPkg constants updated
- internal/config: config file path ~/.config/geheim.json → ~/.config/foostore.json
- All import paths and comments updated throughout
- Delete geheim.rb (the original Ruby implementation, superseded by this Go rewrite)
- CLAUDE.md rewritten to reflect the Go implementation, new binary name,
build system (mage), and current package architecture
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 2 | ||||
| -rw-r--r-- | internal/config/config_test.go | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index f48a046..6354d83 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -14,7 +14,7 @@ import ( ) // configPath is the location of the optional user config file. -const configPath = "~/.config/geheim.json" +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. diff --git a/internal/config/config_test.go b/internal/config/config_test.go index ae2d6c1..3f8ace9 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -9,7 +9,7 @@ import ( "testing" ) -// writeUserConfig creates the ~/.config/geheim.json file inside the given +// writeUserConfig creates the ~/.config/foostore.json file inside the given // HOME directory (which must already exist). Used to exercise Load() directly. func writeUserConfig(t *testing.T, home, content string) { t.Helper() @@ -17,7 +17,7 @@ func writeUserConfig(t *testing.T, home, content string) { if err := os.MkdirAll(cfgDir, 0o755); err != nil { t.Fatalf("MkdirAll: %v", err) } - path := filepath.Join(cfgDir, "geheim.json") + path := filepath.Join(cfgDir, "foostore.json") if err := os.WriteFile(path, []byte(content), 0o600); err != nil { t.Fatalf("WriteFile: %v", err) } @@ -167,7 +167,7 @@ func TestLoad_invalid_json(t *testing.T) { // TestLoad_missing_file_no_warning verifies that a missing config file does NOT // produce any output — absence is normal for a first-run or unconfigured install. func TestLoad_missing_file_no_warning(t *testing.T) { - dir := t.TempDir() // no geheim.json inside + dir := t.TempDir() // no foostore.json inside t.Setenv("HOME", dir) stderr := captureStderr(func() { _ = Load() }) @@ -188,7 +188,7 @@ func TestLoad_unreadable_file(t *testing.T) { writeUserConfig(t, dir, `{"edit_cmd":"nvim"}`) // Make the file unreadable. - cfgPath := filepath.Join(dir, ".config", "geheim.json") + cfgPath := filepath.Join(dir, ".config", "foostore.json") if err := os.Chmod(cfgPath, 0o000); err != nil { t.Fatalf("Chmod: %v", err) } |
