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 /cmd/geheim | |
| 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 'cmd/geheim')
| -rw-r--r-- | cmd/geheim/main.go | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/cmd/geheim/main.go b/cmd/geheim/main.go deleted file mode 100644 index 1d5f6e6..0000000 --- a/cmd/geheim/main.go +++ /dev/null @@ -1,43 +0,0 @@ -// main is the thin entry point for the geheim binary. -// It handles the -version flag, sets up a signal-cancellable context, -// initialises the CLI, and exits with the code returned by Run. -// All command logic lives in internal/cli. -package main - -import ( - "context" - "flag" - "fmt" - "os" - "os/signal" - "syscall" - - "codeberg.org/snonux/geheim/internal/cli" - "codeberg.org/snonux/geheim/internal/version" -) - -func main() { - // -version prints the build version and exits immediately. - versionFlag := flag.Bool("version", false, "print version and exit") - flag.Parse() - if *versionFlag { - fmt.Println(version.Version) - os.Exit(0) - } - - // Cancel the context on SIGINT or SIGTERM so that long-running operations - // (fzf, external editors) terminate gracefully rather than being killed hard. - ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) - defer stop() - - c, err := cli.New(ctx) - if err != nil { - fmt.Fprintf(os.Stderr, "FATAL %v\n", err) - os.Exit(3) - } - - // flag.Args() returns arguments after flags, so flag-aware invocations - // like `geheim -version` work while plain `geheim cat foo` still passes - // all args through unchanged. - os.Exit(c.Run(ctx, flag.Args())) -} |
