Skip to content

Commit

Permalink
update some
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Sep 13, 2020
1 parent bf863fe commit 03a3efc
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions utils.go
Expand Up @@ -234,13 +234,15 @@ func Fprintln(w io.Writer, a ...interface{}) {
// Lprint passes colored messages to a log.Logger for printing.
// Notice: should be goroutine safe
func Lprint(l *log.Logger, a ...interface{}) {
if isLikeInCmd {
renderColorCodeOnCmd(func() {
l.Print(Render(a...))
})
} else {
l.Print(Render(a...))
}
l.Print(Render(a...))

// if isLikeInCmd {
// renderColorCodeOnCmd(func() {
// l.Print(Render(a...))
// })
// } else {
// l.Print(Render(a...))
// }
}

// Render parse color tags, return rendered string.
Expand Down

0 comments on commit 03a3efc

Please sign in to comment.