diff --git a/modules/gitlabtodo/widget.go b/modules/gitlabtodo/widget.go index e6f1c16e..54102c98 100644 --- a/modules/gitlabtodo/widget.go +++ b/modules/gitlabtodo/widget.go @@ -125,8 +125,10 @@ 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) - widget.Refresh() + _, err := widget.gitlabClient.Todos.MarkTodoAsDone(todo.ID) + if err == nil { + widget.Refresh() + } } } diff --git a/modules/ipaddresses/ipinfo/widget.go b/modules/ipaddresses/ipinfo/widget.go index c162e50b..ce6fdf01 100644 --- a/modules/ipaddresses/ipinfo/widget.go +++ b/modules/ipaddresses/ipinfo/widget.go @@ -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