feat: huge overhaul of messaging into FAIL, WARN, hint, ok, prompt, and progress types

This commit is contained in:
Lewis Wynne 2026-02-11 02:11:58 +00:00
parent 6ccd801c89
commit b52a5bfdb7
30 changed files with 192 additions and 96 deletions

View file

@ -31,18 +31,20 @@ import (
// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "pda",
Short: "A key-value store tool",
Long: asciiArt,
Use: "pda",
Short: "A key-value store tool",
Long: asciiArt,
SilenceErrors: true, // we print errors ourselves
}
func Execute() {
if configErr != nil {
fmt.Fprintln(os.Stderr, "failed to load config:", configErr)
printError(fmt.Errorf("cannot load config: %v", configErr))
os.Exit(1)
}
err := rootCmd.Execute()
if err != nil {
printErrorWithHints(err)
os.Exit(1)
}
}