lint: fix function parameters being overwritten before they are used (SA4009)

Signed-off-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Moritz Poldrack 2022-07-29 21:11:01 +02:00 committed by Robin Jarry
parent 47b258f709
commit ea2ac83a4d

View file

@ -180,11 +180,11 @@ func unsubscribeHTTP(aerc *widgets.Aerc, u *url.URL) error {
"Do you want to open this link?", "Do you want to open this link?",
u.String(), u.String(),
[]string{"No", "Yes"}, 0, aerc.SelectedAccountUiConfig(), []string{"No", "Yes"}, 0, aerc.SelectedAccountUiConfig(),
func(option string, err error) { func(option string, _ error) {
aerc.CloseDialog() aerc.CloseDialog()
switch option { switch option {
case "Yes": case "Yes":
if err = lib.NewXDGOpen(u.String()).Start(); err != nil { if err := lib.NewXDGOpen(u.String()).Start(); err != nil {
aerc.PushError("Unsubscribe:" + err.Error()) aerc.PushError("Unsubscribe:" + err.Error())
} }
default: default: