1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Use errcheck to find unhandled errors (#795)

Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
Chris Cummer
2019-12-17 08:26:16 -08:00
committed by GitHub
parent 04ff03ab1c
commit cde904ff08
44 changed files with 250 additions and 97 deletions

View File

@@ -158,7 +158,10 @@ func (widget *Widget) deleteSelectedTorrent() {
DeleteLocalData: false,
}
widget.client.TorrentRemove(removePayload)
err := widget.client.TorrentRemove(removePayload)
if err != nil {
return
}
widget.display()
}
@@ -176,10 +179,15 @@ func (widget *Widget) pauseUnpauseTorrent() {
ids := []int64{*currTorrent.ID}
var err error
if *currTorrent.Status == transmissionrpc.TorrentStatusStopped {
widget.client.TorrentStartIDs(ids)
err = widget.client.TorrentStartIDs(ids)
} else {
widget.client.TorrentStopIDs(ids)
err = widget.client.TorrentStopIDs(ids)
}
if err != nil {
return
}
widget.display()