Skip to content

Commit

Permalink
Merge pull request #80 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 4.8.1
  • Loading branch information
andyone authored Nov 16, 2021
2 parents e4513af + 8570621 commit 2413b8b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
// Application info
const (
APP = "bibop"
VER = "4.8.0"
VER = "4.8.1"
DESC = "Utility for testing command-line tools"
)

Expand Down Expand Up @@ -312,12 +312,20 @@ func getRenderer() render.Renderer {

// printError prints error message to console
func printError(f string, a ...interface{}) {
fmtc.Fprintf(os.Stderr, "{r}"+f+"{!}\n", a...)
if len(a) == 0 {
fmtc.Fprintln(os.Stderr, "{r}"+f+"{!}")
} else {
fmtc.Fprintf(os.Stderr, "{r}"+f+"{!}\n", a...)
}
}

// printError prints warning message to console
func printWarn(f string, a ...interface{}) {
fmtc.Fprintf(os.Stderr, "{y}"+f+"{!}\n", a...)
if len(a) == 0 {
fmtc.Fprintln(os.Stderr, "{y}"+f+"{!}")
} else {
fmtc.Fprintf(os.Stderr, "{y}"+f+"{!}\n", a...)
}
}

// printErrorAndExit print error mesage and exit with exit code 1
Expand Down

0 comments on commit 2413b8b

Please sign in to comment.