diff pkg/imports/sr.go @ 5595:bbc257dd9abf

Mixed bad error handling found by staticcheck.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 05 Aug 2022 12:22:06 +0200
parents 7e8830c808ba
children 4abbb62d2bed
line wrap: on
line diff
--- a/pkg/imports/sr.go	Fri Aug 05 12:14:44 2022 +0200
+++ b/pkg/imports/sr.go	Fri Aug 05 12:22:06 2022 +0200
@@ -741,8 +741,9 @@
 	}
 
 	if m.SurveyType != models.SurveyTypeMarking {
+		var index []byte
 
-		index, err := final.Bytes()
+		index, err = final.Bytes()
 		if err != nil {
 			return nil, err
 		}