-q to silence stderr, -qq to silence everything.

This commit is contained in:
fiatjaf
2024-01-24 22:38:51 -03:00
parent 3f7089e27e
commit 14b69f36cf
9 changed files with 26 additions and 22 deletions

View File

@@ -25,6 +25,8 @@ var log = func(msg string, args ...any) {
fmt.Fprintf(os.Stderr, msg, args...)
}
var stdout = fmt.Println
func isPiped() bool {
stat, _ := os.Stdin.Stat()
return stat.Mode()&os.ModeCharDevice == 0