mirror of
https://github.com/aykhans/dodo.git
synced 2025-09-05 10:43:37 +00:00
Here we go again...
This commit is contained in:
17
pkg/utils/print.go
Normal file
17
pkg/utils/print.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/jedib0t/go-pretty/v6/text"
|
||||
)
|
||||
|
||||
func PrintErr(color text.Color, format string, a ...any) {
|
||||
fmt.Fprintln(os.Stderr, color.Sprintf(format, a...))
|
||||
}
|
||||
|
||||
func PrintErrAndExit(color text.Color, exitCode int, format string, a ...any) {
|
||||
PrintErr(color, format, a...)
|
||||
os.Exit(exitCode)
|
||||
}
|
Reference in New Issue
Block a user