@@ -25,7 +25,9 @@ import (
25
25
"path/filepath"
26
26
"runtime"
27
27
"time"
28
+ )
28
29
30
+ import (
29
31
"github.com/mattn/go-isatty"
30
32
)
31
33
@@ -85,7 +87,7 @@ func CPrintfln(color []byte, format string, args ...interface{}) {
85
87
func CEPrintf (color []byte , format string , args ... interface {}) {
86
88
logStr := fmt .Sprintf (format , args ... )
87
89
if isatty .IsTerminal (os .Stdout .Fd ()) {
88
- fmt .Fprint (os .Stderr , string (color )+ funcFileLine ()+ "%s" + string (reset ), logStr )
90
+ fmt .Fprintf (os .Stderr , string (color )+ funcFileLine ()+ "%s" + string (reset ), logStr )
89
91
} else {
90
92
fmt .Fprintf (os .Stderr , "%s" , logStr )
91
93
}
@@ -94,7 +96,7 @@ func CEPrintf(color []byte, format string, args ...interface{}) {
94
96
func CEPrintfln (color []byte , format string , args ... interface {}) {
95
97
logStr := fmt .Sprintf (format , args ... )
96
98
if isatty .IsTerminal (os .Stdout .Fd ()) {
97
- fmt .Fprint (os .Stderr , string (color )+ funcFileLine ()+ "%s" + string (reset )+ "\n " , logStr )
99
+ fmt .Fprintf (os .Stderr , string (color )+ funcFileLine ()+ "%s" + string (reset )+ "\n " , logStr )
98
100
} else {
99
101
fmt .Fprintf (os .Stderr , "%s\n " , logStr )
100
102
}
0 commit comments