Files
lambda/internal/cli/exit.go
2025-12-29 20:01:44 -05:00

18 lines
279 B
Go

package cli
import (
"fmt"
"os"
)
// A helper function to handle errors in the program. If it is given an error,
// the program will exist, and print the error.
func HandleError(err error) {
if err == nil {
return
}
fmt.Fprintln(os.Stderr, "ERROR:", err)
os.Exit(1)
}