simplified unnecessary if

You can remove this if and just directly return err since it's nil if there is no error
pull/119/head
Jonas Bögle 7 years ago committed by GitHub
parent 1175eafe1c
commit f2812ea814
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -61,11 +61,8 @@ func (b *Bot) sendFiles(
return err
}
if _, err = io.Copy(part, file); err != nil {
return err
}
return nil
_, err = io.Copy(part, file)
return err
} (); err != nil {
return nil, wrapSystem(err)
}

Loading…
Cancel
Save