mirror of https://github.com/fiatjaf/nak.git
use color.Output and color.Error instead of os.Stdout and os.Stderr in some places.
This commit is contained in:
parent
02f22a8c2f
commit
9055f98f66
|
@ -130,7 +130,7 @@ var blossomCmd = &cli.Command{
|
|||
hasError = true
|
||||
continue
|
||||
}
|
||||
os.Stdout.Write(data)
|
||||
stdout(data)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ const (
|
|||
var (
|
||||
log = func(msg string, args ...any) { fmt.Fprintf(color.Error, msg, args...) }
|
||||
logverbose = func(msg string, args ...any) {} // by default do nothing
|
||||
stdout = fmt.Println
|
||||
stdout = func(args ...any) { fmt.Fprintln(color.Output, args...) }
|
||||
)
|
||||
|
||||
func isPiped() bool {
|
||||
|
|
Loading…
Reference in New Issue