From: Matt Joiner Date: Tue, 21 Sep 2021 03:06:06 +0000 (+1000) Subject: cmd/torrent: Don't make --stats default to --debug's value X-Git-Tag: v1.32.0~21 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=ebd523e39c1cf25aa150b2f18045f2f3e5e51431;p=btrtrc.git cmd/torrent: Don't make --stats default to --debug's value --- diff --git a/cmd/torrent/main.go b/cmd/torrent/main.go index e1fa04b4..a2a34f63 100644 --- a/cmd/torrent/main.go +++ b/cmd/torrent/main.go @@ -178,9 +178,9 @@ type DownloadCmd struct { PublicIP net.IP Progress bool `default:"true"` PieceStates bool - Quiet bool `help:"discard client logging"` - Stats *bool `help:"print stats at termination"` - Dht bool `default:"true"` + Quiet bool `help:"discard client logging"` + Stats bool `help:"print stats at termination"` + Dht bool `default:"true"` TcpPeers bool `default:"true"` UtpPeers bool `default:"true"` @@ -196,10 +196,7 @@ type DownloadCmd struct { } func statsEnabled(flags downloadFlags) bool { - if flags.Stats == nil { - return flags.Debug - } - return *flags.Stats + return flags.Stats } func exitSignalHandlers(notify *missinggo.SynchronizedEvent) {