Files
secret/cmd/secret/main.go
T
clawbot 51e3731076
check / check (push) Successful in 1m35s
Wipe memguard buffers on every exit and restore echo (closes #35)
Entry() now returns the exit code and only main calls os.Exit, so the
deferred memguard.Purge() in Entry() runs on success and on error;
before, os.Exit(1) skipped every deferred Destroy().

SIGINT and SIGTERM go through memguard's handler, which wipes every
buffer and exits with status 1. The passphrase prompt turns terminal
echo off until its read returns, and the handler exits before that, so
the handler first restores the terminal settings saved at startup, but
only when this process is in the terminal's foreground process group: a
background process that changes the terminal is stopped instead of
exiting.

Model: opus-5-5
2026-10-04 02:07:58 +02:00

13 lines
179 B
Go

// Package main is the entry point for the secret CLI application.
package main
import (
"os"
"git.eeqj.de/sneak/secret/internal/cli"
)
func main() {
os.Exit(cli.Entry())
}