Drop error & nil checks where the value can not have changed.
lines := strings.Split(string(b), "\n")
- if le != nil && lepos.ColumnNumber >= 0 {
+ if lepos.ColumnNumber >= 0 {
pos.ColumnNumber = lepos.ColumnNumber
}
// Diff local vs remote to see what changes need to be applied.
uploads, deletes := findDiffs(local, remote, d.force)
- if err != nil {
- return err
- }
d.summary.NumUploads = len(uploads)
d.summary.NumDeletes = len(deletes)
if len(uploads)+len(deletes) == 0 {
b := img.Bounds().Intersect(rect)
- cropped, err := imaging.Crop(img, b), nil
- if err != nil {
- return nil, err
- }
+ cropped := imaging.Crop(img, b)
return imaging.Resize(cropped, width, height, filter), nil