(code int, format string, values ...any)
| 150 | } |
| 151 | |
| 152 | func printErrorAndExit(code int, format string, values ...any) { |
| 153 | fmt.Fprintf(os.Stderr, "ERROR: %s\n", fmt.Sprintf(format, values...)) |
| 154 | fmt.Fprintln(os.Stderr) |
| 155 | os.Exit(code) |
| 156 | } |
| 157 | |
| 158 | func printUsageErrorAndExit(format string, values ...any) { |
| 159 | fmt.Fprintf(os.Stderr, "ERROR: %s\n", fmt.Sprintf(format, values...)) |