Skip to content

Commit

Permalink
simplified unnecessary if
Browse files Browse the repository at this point in the history
You can remove this if and just directly return err since it's nil if there is no error
  • Loading branch information
irgendwr authored Dec 25, 2017
1 parent 1175eaf commit f2812ea
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit f2812ea

Please sign in to comment.