make if else clauses easier to parse

This commit is contained in:
kim 2024-04-26 12:14:50 +01:00
parent 1ec1af9e22
commit 2e5c93fdba

View file

@ -60,8 +60,11 @@ func (f *federatingDB) Delete(ctx context.Context, id *url.URL) error {
receiving, receiving,
uriStr, uriStr,
) )
if err != nil || ok { // handles success if err != nil {
return err return err
} else if ok {
// success!
return nil
} }
// Attempt to delete status. // Attempt to delete status.
@ -70,8 +73,11 @@ func (f *federatingDB) Delete(ctx context.Context, id *url.URL) error {
receiving, receiving,
uriStr, uriStr,
) )
if err != nil || ok { // handles success if err != nil {
return err return err
} else if ok {
// success!
return nil
} }
// Log at debug level, as lots of these could indicate federation // Log at debug level, as lots of these could indicate federation