Add unit tests for escape sequence parse functions (#2116)
This commit is contained in:
1 parent
04afd78e65
commit
8f97bf806a
4 files changed
+67
-28
No files matched your search
@@ -744,14 +744,6 @@ func (ui *ui) echomsg(msg string) {
|
||||
log.Print(msg)
|
||||
}
|
||||
|
||||
func optionToFmtstr(optstr string) string {
|
||||
if !strings.Contains(optstr, "%s") {
|
||||
return optstr + "%s\033[0m"
|
||||
} else {
|
||||
return optstr
|
||||
}
|
||||
}
|
||||
|
||||
func (ui *ui) echoerr(msg string) {
|
||||
ui.echo(fmt.Sprintf(optionToFmtstr(gOpts.errorfmt), msg))
|
||||
log.Printf("error: %s", msg)
|
||||
|
||||
Reference in new issue
Block a user