refactor(errors): implement structured error handling for improved debugging

This commit is contained in:
Yar Kravtsov
2025-06-03 07:58:21 +03:00
parent 3cba309c05
commit 1e2c9704f3
15 changed files with 482 additions and 213 deletions

View File

@@ -32,8 +32,9 @@ Supports both common configurations and host-specific setups.
lnk push "setup complete" # Sync to remote
🎯 Simple, fast, Git-native, and multi-host ready.`,
SilenceUsage: true,
Version: fmt.Sprintf("%s (built %s)", version, buildTime),
SilenceUsage: true,
SilenceErrors: true,
Version: fmt.Sprintf("%s (built %s)", version, buildTime),
}
// Add subcommands
@@ -57,7 +58,7 @@ func SetVersion(v, bt string) {
func Execute() {
rootCmd := NewRootCommand()
if err := rootCmd.Execute(); err != nil {
fmt.Fprintln(os.Stderr, err)
_, _ = fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}