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

Fix issues found by errcheck

Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
Chris Cummer 2020-05-06 22:50:00 -07:00
parent ee1e030cdf
commit 10a8d27462
2 changed files with 5 additions and 3 deletions

View File

@ -125,9 +125,11 @@ func (widget *Widget) markAsDone() {
sel := widget.GetSelected()
if sel >= 0 && widget.todos != nil && sel < len(widget.todos) {
todo := widget.todos[sel]
widget.gitlabClient.Todos.MarkTodoAsDone(todo.ID)
_, err := widget.gitlabClient.Todos.MarkTodoAsDone(todo.ID)
if err == nil {
widget.Refresh()
}
}
}
func (widget *Widget) openTodo() {

View File

@ -128,7 +128,7 @@ func getMyIP() (ip net.IP, v6 bool) {
if err != nil {
return
}
defer conn.Close()
defer func() { _ = conn.Close() }()
addr := conn.LocalAddr().(*net.TCPAddr)
ip = addr.IP