mirror of
https://github.com/fiatjaf/nak.git
synced 2025-12-09 09:08:50 +00:00
use color.Output and color.Error instead of os.Stdout and os.Stderr in some places.
This commit is contained in:
@@ -130,7 +130,7 @@ var blossomCmd = &cli.Command{
|
|||||||
hasError = true
|
hasError = true
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
os.Stdout.Write(data)
|
stdout(data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const (
|
|||||||
var (
|
var (
|
||||||
log = func(msg string, args ...any) { fmt.Fprintf(color.Error, msg, args...) }
|
log = func(msg string, args ...any) { fmt.Fprintf(color.Error, msg, args...) }
|
||||||
logverbose = func(msg string, args ...any) {} // by default do nothing
|
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 {
|
func isPiped() bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user