diff pkg/imports/sr.go @ 5473:93af8d1ea09f

Cosmetics.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 20 Jul 2021 18:54:35 +0200
parents e00b3296fc02
children 728b58946c34
line wrap: on
line diff
--- a/pkg/imports/sr.go	Tue Jul 20 11:50:17 2021 +0200
+++ b/pkg/imports/sr.go	Tue Jul 20 18:54:35 2021 +0200
@@ -648,11 +648,10 @@
 		id       int64
 		dummy    uint32
 		lat, lon float64
+		hull     []byte
 	)
 
-	var hull []byte
-
-	err = tx.QueryRowContext(
+	switch err := tx.QueryRowContext(
 		ctx,
 		insertHullSQL,
 		m.Bottleneck,
@@ -669,9 +668,7 @@
 		&lon,
 		&dummy,
 		&hull,
-	)
-
-	switch {
+	); {
 	case err == sql.ErrNoRows:
 		return nil, fmt.Errorf(
 			"no matching bottleneck of given name or time available: %v", err)