beads/cmd/bd/setup/exit.go
coffeegoddd☕️✨ d7d7a34607 : refactor to use RunE, emit usage metrics, skip metrics in CI
(cherry picked from commit 9596c7233d)
2026-06-22 20:44:43 +00:00

24 lines
465 B
Go

package setup
import (
"errors"
"fmt"
"os"
)
var ErrSilent = errors.New("setup: failure already reported")
func HandleError(format string, args ...interface{}) error {
fmt.Fprintf(os.Stderr, "Error: "+format+"\n", args...)
return ErrSilent
}
func HandleErrorWithHint(message, hint string) error {
fmt.Fprintf(os.Stderr, "Error: %s\n", message)
fmt.Fprintf(os.Stderr, "Hint: %s\n", hint)
return ErrSilent
}
func SilentExit() error {
return ErrSilent
}