Mercurial > gemma
diff pkg/controllers/diff.go @ 4847:4847ac70103a
Made staticcheck happy.
- error strings should not end with punctuation or a newline (ST1005)
- error strings should not be capitalized (ST1005)
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 18 Nov 2019 11:54:20 +0100 |
parents | f4abfd0ee8ad |
children | 34bc6041e61e |
line wrap: on
line diff
--- a/pkg/controllers/diff.go Thu Nov 14 14:53:15 2019 +0100 +++ b/pkg/controllers/diff.go Mon Nov 18 11:54:20 2019 +0100 @@ -172,7 +172,7 @@ } if minuendTree == nil { - return 0, fmt.Errorf("Cannot find survey for %s/%s.", + return 0, fmt.Errorf("cannot find survey for %s/%s", dci.Bottleneck, dci.Minuend.Format(common.DateFormat)) } @@ -190,13 +190,13 @@ dci.Subtrahend.Time, ).Scan(&box.X1, &box.Y1, &box.X2, &box.Y2); { case err == sql.ErrNoRows: - return 0, errors.New("No such intersection") + return 0, errors.New("no such intersection") case err != nil: return 0, err } if box.Empty() { - return 0, errors.New("Intersection is empty") + return 0, errors.New("intersection is empty") } log.Printf("info: bbox of intersection: (%.2f, %.2f) - (%.2f, %.2f)\n", @@ -221,15 +221,15 @@ } if subtrahendTree == nil { - return 0, fmt.Errorf("Cannot find survey for %s/%s.", + return 0, fmt.Errorf("cannot find survey for %s/%s", dci.Bottleneck, dci.Subtrahend.Format(common.DateFormat)) } // We need a slow path implementation for this. if epsg != subtrahendTree.EPSG() { - return 0, errors.New("Calculating differences between two different " + - "EPSG code meshes are not supported, yet.") + return 0, errors.New("calculating differences between two different " + + "EPSG code meshes are not supported, yet") } start = time.Now() @@ -246,7 +246,7 @@ zMin, zMax, ok := raster.ZExtent() if !ok { - return 0, errors.New("Scans do not have common points") + return 0, errors.New("scans do not have common points") } log.Printf("info: z range: %.3f - %.3f\n", zMin, zMax)