mirror of
https://github.com/fiatjaf/nak.git
synced 2025-08-31 22:10:47 -04:00
add --silent global option to remove the stderr logs.
This commit is contained in:
13
main.go
13
main.go
@@ -19,6 +19,19 @@ var app = &cli.App{
|
||||
encode,
|
||||
verify,
|
||||
},
|
||||
Flags: []cli.Flag{
|
||||
&cli.BoolFlag{
|
||||
Name: "silent",
|
||||
Usage: "do not print logs and info messages to stderr",
|
||||
Aliases: []string{"s"},
|
||||
Action: func(ctx *cli.Context, b bool) error {
|
||||
if b {
|
||||
log = func(msg string, args ...any) {}
|
||||
}
|
||||
return nil
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
Reference in New Issue
Block a user